fix Api key meteo

This commit is contained in:
2020-04-04 11:02:04 +02:00
parent 7b5d332efe
commit 555080e8be

View File

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