created_by === $user->id || $user->can((new \ReflectionClass($this))->getShortName().'.'.__FUNCTION__); } /** * Determine whether the user can delete the model. */ public function delete(User $user, ProjectProposal $projectProposal): bool { return $projectProposal->created_by === $user->id || $user->can((new \ReflectionClass($this))->getShortName().'.'.__FUNCTION__); } /** * Determine whether the user can restore the model. */ public function restore(User $user, ProjectProposal $projectProposal): bool { return false; } /** * Determine whether the user can permanently delete the model. */ public function forceDelete(User $user, ProjectProposal $projectProposal): bool { return false; } }