role === 'winemaker' && $plannedTask->execution_date === null; } /** * Determine whether the user can delete the model. */ public function delete(User $user, PlannedTask $plannedTask): bool { return $user->role === 'winemaker' && $plannedTask->execution_date === null; } /** * Determine whether the user can restore the model. */ public function restore(User $user, PlannedTask $plannedTask): bool { return false; } /** * Determine whether the user can permanently delete the model. */ public function forceDelete(User $user, PlannedTask $plannedTask): bool { return false; } }