update deploy
This commit is contained in:
21
app/Actions/GuideCard/DeleteGuideCardAction.php
Normal file
21
app/Actions/GuideCard/DeleteGuideCardAction.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\GuideCard;
|
||||
|
||||
use App\Events\ModelChanged;
|
||||
use App\Models\GuideCard;
|
||||
use App\Repositories\Contracts\GuideCardRepositoryInterface;
|
||||
|
||||
final class DeleteGuideCardAction
|
||||
{
|
||||
public function __construct(private GuideCardRepositoryInterface $repository) {}
|
||||
|
||||
public function execute(GuideCard $guideCard): bool
|
||||
{
|
||||
$this->repository->delete($guideCard);
|
||||
|
||||
ModelChanged::dispatch(GuideCard::class, 'deleted');
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user