add meteo home board

This commit is contained in:
2020-07-02 20:40:38 +02:00
parent 53f6cd19fa
commit b6143e67a8
5 changed files with 82 additions and 4 deletions

View File

@@ -0,0 +1,19 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class AutomationController extends Controller
{
public function home()
{
$url = "http://192.168.1.32/meteo/meteo/api/?device=all&instant";
$client = new \GuzzleHttp\Client();
$promise = $client->requestAsync('GET', $url);
$response = $promise->wait();
return $response->getBody()->getContents();
}
}