wi-adrema-plugin/routes.php

14 lines
346 B
PHP

<?php
use Silva\Adrema\Support\FetchAllEvents;
Route::get('/api/silva_adrema_event_overview', function () {
$events = app(FetchAllEvents::class)->run();
if (is_null($events)) {
return Response::json(['message' => 'Fehler beim Laden der Veranstaltungen'], 422);
}
return Response::json($events);
})->middleware('api');