Direct payments for invoices
Events can be moved to archive and moved back Fixed validation
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Domains\Event\Controllers;
|
||||
|
||||
use App\Providers\InertiaProvider;
|
||||
use App\Scopes\CommonController;
|
||||
use Illuminate\Http\Request;
|
||||
use Inertia\Response;
|
||||
|
||||
class ArchivedEventsController extends CommonController
|
||||
{
|
||||
public function __invoke(Request $request): Response {
|
||||
$events = [];
|
||||
foreach ($this->events->getEventsByCriteria(['archived' => true]) as $event) {
|
||||
$events[] = [
|
||||
'id' => $event->id,
|
||||
'name' => $event->name,
|
||||
'location' => $event->location,
|
||||
'postalCode' => $event->postal_code,
|
||||
'eventBegin' => $event->start_date->format('d.m.Y'),
|
||||
'eventEnd' => $event->end_date->format('d.m.Y'),
|
||||
];
|
||||
}
|
||||
|
||||
return (new InertiaProvider('Event/ArchivedEvents', ['events' => $events]))->render();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user