Merge branch 'master' into 'production'

fix Api key meteo

See merge request Romulus21/portal!13
This commit is contained in:
Romain Delanoë
2020-04-04 09:09:36 +00:00

View File

@@ -9,8 +9,7 @@ class MeteoController extends Controller
public function index() public function index()
{ {
$idCity = 2995971; $idCity = 2995971;
$apiKey = env('OPEN_WEATHER_MAP_API_KEY'); $apiKey = env('OPEN_WEATHER_MAP_API_KEY', '');
echo 'API Key OpenWeatherMaps'.$apiKey;
$params = '&units=metric&lang=fr'; $params = '&units=metric&lang=fr';
$url = 'https://api.openweathermap.org/data/2.5/forecast?id='.$idCity.'&appid='.$apiKey.$params; $url = 'https://api.openweathermap.org/data/2.5/forecast?id='.$idCity.'&appid='.$apiKey.$params;
$client = new \GuzzleHttp\Client(); $client = new \GuzzleHttp\Client();