adrema/app/Activity/Actions/CreateAction.php

29 lines
627 B
PHP
Raw Normal View History

2023-02-25 18:00:23 +01:00
<?php
namespace App\Activity\Actions;
use App\Activity\Resources\ActivityResource;
use Inertia\Inertia;
use Inertia\Response;
use Lorisleiva\Actions\Concerns\AsAction;
class CreateAction
{
use AsAction;
public function handle(): Response
{
2023-05-02 23:13:00 +02:00
session()->put('menu', 'activity');
session()->put('title', 'Tätigkeit erstellen');
2023-02-25 18:00:23 +01:00
return Inertia::render('activity/VForm', [
'meta' => ActivityResource::meta(),
'data' => [
'name' => '',
2023-03-04 12:09:25 +01:00
'is_filterable' => false,
2023-02-25 18:00:23 +01:00
'subactivities' => [],
2023-03-04 12:09:25 +01:00
],
2023-02-25 18:00:23 +01:00
]);
}
}