diff --git a/app/Http/Controllers/MeteoController.php b/app/Http/Controllers/MeteoController.php index a778ef9..00c8ffd 100644 --- a/app/Http/Controllers/MeteoController.php +++ b/app/Http/Controllers/MeteoController.php @@ -9,7 +9,7 @@ class MeteoController extends Controller public function index() { $idCity = 2995971; - $apiKey = env('OPEN_WEATHER_MAP_API_KEY', ''); + $apiKey = config('portal.open_weather_map_api_key'); $params = '&units=metric&lang=fr'; $url = 'https://api.openweathermap.org/data/2.5/forecast?id='.$idCity.'&appid='.$apiKey.$params; $client = new \GuzzleHttp\Client(); diff --git a/config/portal.php b/config/portal.php new file mode 100644 index 0000000..36f1e66 --- /dev/null +++ b/config/portal.php @@ -0,0 +1,5 @@ + env('OPEN_WEATHER_MAP_API_KEY'), +];