Follow these security practices.
Lock Properties
#[Locked]
public int $postId;Validate Everything
public function update(int $id): void
{
$post = Post::findOrFail($id);
$this->authorize('update', $post);
}Use Policies
$this->authorize('view', $resource);