Files
KanbanGit/app/Actions/Notifications/DeleteProjectNotificationAction.php

18 lines
390 B
PHP

<?php
namespace App\Actions\Notifications;
use App\Models\NotificationAction;
use App\Models\Project;
class DeleteProjectNotificationAction
{
public function handle(Project $project, NotificationAction $notificationAction): void
{
$project->notificationActions()
->whereKey($notificationAction->id)
->firstOrFail()
->delete();
}
}