modifiche varie

This commit is contained in:
2023-08-02 19:12:37 +02:00
parent 8ff62254bf
commit d7fe1fcb81
12 changed files with 183 additions and 13 deletions

View File

@@ -4,6 +4,7 @@ namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Http;
class Avviso extends Model
{
@@ -25,4 +26,25 @@ class Avviso extends Model
{
return self::all();
}
public static function getHAstatus()
{
/*$response = Http::withHeaders([
'Authorization'=>' Bearer '.env('HA_TOKEN'),
'Content-Type'=>' application/json',
])->get('https://ha.lavorain.cloud/api/services',['domain']);
return $response;
// return dd($response);*/
}
public static function getAnsaNews()
{
/*$xmlstring = Http::get('https://www.ansa.it/trentino/notizie/trentino_rss.xml');
$xml_file = simplexml_load_string($xmlstring);
$json = json_encode($xml_file );
$array = json_decode($json,TRUE);
dd($array); // return $array;*/
}
}