adrema/app/Form/Actions/FormDestroyAction.php

20 lines
339 B
PHP
Raw Permalink Normal View History

2024-01-01 18:29:33 +01:00
<?php
namespace App\Form\Actions;
use App\Form\Models\Form;
use App\Lib\Events\Succeeded;
use Lorisleiva\Actions\Concerns\AsAction;
class FormDestroyAction
{
use AsAction;
public function asController(Form $form): void
{
$form->delete();
Succeeded::message('Veranstaltung gelöscht.')->dispatch();
}
}