Files
bogazici-api/app/Actions/Faq/DeleteFaqAction.php
2026-03-27 10:41:54 +03:00

22 lines
427 B
PHP

<?php
namespace App\Actions\Faq;
use App\Events\ModelChanged;
use App\Models\Faq;
use App\Repositories\Contracts\FaqRepositoryInterface;
final class DeleteFaqAction
{
public function __construct(private FaqRepositoryInterface $repository) {}
public function execute(Faq $faq): bool
{
$this->repository->delete($faq);
ModelChanged::dispatch(Faq::class, 'deleted');
return true;
}
}