add config file portal to fix env error maybe
This commit is contained in:
@@ -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();
|
||||
|
||||
5
config/portal.php
Normal file
5
config/portal.php
Normal file
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'open_weather_map_api_key' => env('OPEN_WEATHER_MAP_API_KEY'),
|
||||
];
|
||||
Reference in New Issue
Block a user