id === $post->user_id; return !!$user; } /** * Determine whether the user can delete the model. */ public function delete(User $user, Post $post): bool { // In a real application, you might want to check if the user owns the post: // return $user->id === $post->user_id; return !!$user; } /** * Determine whether the user can restore the model. */ public function restore(User $user, Post $post): bool { return !!$user; } /** * Determine whether the user can permanently delete the model. */ public function forceDelete(User $user, Post $post): bool { return !!$user; } }