0065-laravel-policies-and-authorization
CommunityStandardize controller authorization with Laravel
Software Engineering#authorization#access control#middleware#laravel#gates#policies#resource controllers
AuthorMrJmpl3
Version1.0.0
Installs0
System Documentation
What problem does it solve?
It reduces the risk of inconsistent or forgotten access checks by centralizing authorization logic into Laravel Policies and Gates instead of scattering checks throughout controllers and routes.
Core Features & Use Cases
- Policies for per-model permissions: Define model-specific actions (for example, viewing, creating, updating, deleting) in dedicated policy classes and enforce them in controllers.
- Gates for cross-cutting authorization: Use Gate checks for application-wide rules that don’t naturally belong to a single model policy.
- Resource controller protection patterns: Protect resource controllers using authorizeResource and consistent policy method names to keep controllers clean and maintainable.
Quick Start
Generate a PostPolicy for your Post model and wire it to a resource controller so controller actions use standardized authorization checks.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: 0065-laravel-policies-and-authorization Download link: https://github.com/MrJmpl3/codex_____data_____configuration/archive/main.zip#0065-laravel-policies-and-authorization Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.