wi-adrema-plugin/support/FetchAllEvents.php

19 lines
300 B
PHP
Raw Normal View History

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-02-04 01:12:22 +01:00
$events = app(Proxy::class)->run('/api/form');
if (!$events) {
return null;
}
return collect($events);
2024-02-01 01:58:40 +01:00
}
}