
Laravel Policies And Authorization
- 33 installs
- 10 repo stars
- Updated June 13, 2026
- noartem/laravel-vue-skills
Helps with ai & agent building tasks.
About
laravel-policies-and-authorization is a Claude Code skill in the AI & Agent Building category.
- laravel-policies-and-authorization
- AI & Agent Building
- AI-coding skill
Laravel Policies And Authorization by the numbers
- 33 all-time installs (skills.sh)
- Ranked #8,944 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/noartem/laravel-vue-skills --skill laravel-policies-and-authorizationAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 33 |
|---|---|
| repo stars | ★ 10 |
| Last updated | June 13, 2026 |
| Repository | noartem/laravel-vue-skills ↗ |
What it does
Helps with ai & agent building tasks.
Files
Policies and Authorization
Use Policies for per-model actions; use Gates for cross-cutting checks.
Commands
# Generate a policy
sail artisan make:policy PostPolicy --model=Post # or: php artisan make:policy PostPolicy --model=Post
# Apply in routes (resource controllers)
Route::resource('posts', PostController::class);
// In controller constructor
$this->authorizeResource(Post::class, 'post');
# One-off checks
$this->authorize('update', $post); // in controller
Gate::allows('manage-billing', $user); // ad-hoc gatePatterns
- Use resource policy methods:
viewAny, view, create, update, delete, restore, forceDelete - Prefer policy methods over inline checks; keeps controllers clean
- Register policies in
AuthServiceProvider - Use
canmiddleware for quick route protection:->middleware('can:update,post') - In tests, assert
actingAs($user)->get(...)->assertForbidden()for denied cases
Related skills
AI & Agent Buildingagents