adrema/app/Form/Actions/FormDestroyAction.php

22 lines
381 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();
ClearFrontendCacheAction::run();
2024-01-01 18:29:33 +01:00
Succeeded::message('Veranstaltung gelöscht.')->dispatch();
}
}