0013-laravel-authorization-patterns
CommunityImplement secure Laravel authorization patterns
System Documentation
What problem does it solve?
This Skill helps you prevent authorization bugs in Laravel apps by showing how to consistently implement access control across Gates, Policies, middleware, Blade templates, requests, and controllers.
Core Features & Use Cases
It covers the right use of Gates for general ability checks, Policies for model-based authorization (including before() behavior and rich Response objects), and integrating authorization via middleware, Blade directives, Form Request authorize(), and controller $this->authorize(). It’s designed for common scenarios like role-based admin access, per-model permissions such as viewing/updating posts, and returning correct HTTP behavior (403 vs 404) with testable authorization logic.
Quick Start
Apply Gates and Policies to your routes, Blade views, and controllers using the examples in this Skill, and verify the behavior by writing both direct policy tests and HTTP-level authorization tests.
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: 0013-laravel-authorization-patterns Download link: https://github.com/MrJmpl3/codex_____data_____configuration/archive/main.zip#0013-laravel-authorization-patterns 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.