2024-02-01 01:58:40 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Silva\Adrema\Support;
|
|
|
|
|
2024-02-04 01:12:22 +01:00
|
|
|
use Illuminate\Support\Collection;
|
|
|
|
|
2024-02-01 01:58:40 +01:00
|
|
|
class FetchAllEvents
|
|
|
|
{
|
2024-02-04 01:12:22 +01:00
|
|
|
public function run(): ?Collection
|
2024-02-01 01:58:40 +01:00
|
|
|
{
|
2024-06-10 00:13:43 +02:00
|
|
|
$events = app(Proxy::class)->run('api/form');
|
2024-02-04 01:12:22 +01:00
|
|
|
|
|
|
|
if (!$events) {
|
|
|
|
return null;
|
|
|
|
}
|
2024-06-10 00:13:43 +02:00
|
|
|
|
2024-02-04 01:12:22 +01:00
|
|
|
return collect($events);
|
2024-02-01 01:58:40 +01:00
|
|
|
}
|
|
|
|
}
|