You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-3Lines changed: 14 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,11 @@ Add the following to your `providers` array in `config/app.php`:
47
47
48
48
49
49
```
50
-
50
+
Add API key and desired language in `.env`
51
+
```
52
+
OPENWAETHER_API_KEY=
53
+
OPENWAETHER_API_LANG=en
54
+
```
51
55
52
56
Publish the required package configuration file using the artisan command:
53
57
```
@@ -56,15 +60,22 @@ Publish the required package configuration file using the artisan command:
56
60
Edit the `config/openweather.php` file and modify the `api_key` value with your Open Weather Map api key.
57
61
```php
58
62
return [
59
-
'api_key' => '',
60
-
'lang' => 'en',
63
+
'api_key' => env('OPENWAETHER_API_KEY', ''),
64
+
'onecall_api_version' => '2.5',
65
+
'historical_api_version' => '2.5',
66
+
'forecast_api_version' => '2.5',
67
+
'polution_api_version' => '2.5',
68
+
'geo_api_version' => '1.0',
69
+
'lang' => env('OPENWAETHER_API_LANG', 'en'),
61
70
'date_format' => 'm/d/Y',
62
71
'time_format' => 'h:i A',
63
72
'day_format' => 'l',
64
73
'temp_format' => 'c' // c for celcius, f for farenheit, k for kelvin
65
74
];
66
75
```
67
76
77
+
Now you can configure API version from config as [One Call API](https://openweathermap.org/price) is upgraded to version 3.0. Please set available api version in config.
78
+
68
79
69
80
## Usage
70
81
Here you can see some example of just how simple this package is to use.
0 commit comments