laravel version: 10
- -> authorization logic for model
- -> auto detected if following naming convention, User -> UserPolicy
$request->user()->can('update', $post)
$request->user()->cannot('create', Post::class)
$this->authorize('update', $post);
$this->authorizeResource(Post::class, 'post');
- -> manual version of policy
Gate::allows('update-post', $post)