22 lines
360 B
PHP
22 lines
360 B
PHP
<?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();
|
|
}
|
|
}
|