wi-adrema-plugin/support/FetchAllEvents.php

22 lines
360 B
PHP
Raw Normal View History

2024-02-01 01:58:40 +01:00
<?php
namespace Silva\Adrema\Support;
use Silva\Adrema\Models\Settings;
use Http;
class FetchAllEvents
{
public function run(): ?array
{
$baseUrl = Settings::get('base_url');
$response = Http::get($baseUrl . '/api/form');
if (!$response->ok()) {
return null;
}
return $response->json();
}
}