0064-laravel-policies

Community

Secure access with clear Laravel policies

AuthorMrJmpl3
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill helps you implement consistent authorization rules in Laravel so users can only access resources they are allowed to view, modify, or act on.

Core Features & Use Cases

  • Policy-based authorization: Define Laravel policy methods for common actions like listing, viewing, creating, updating, and deleting resources.
  • Permission enum delegation: Centralize permission strings by using a Permission enum and calling $user->can(...) for authorization checks.
  • Ownership and state checks: Add resource ownership constraints (e.g., customer_id) and enforce business-state rules (e.g., pending orders can be deleted).
  • Custom actions: Implement non-standard operations (e.g., cancel) by composing existing policy logic.

Quick Start

Create or update an OrderPolicy in App\Policies and use permission enums plus ownership/state checks to authorize each action.

Dependency Matrix

Required Modules

None required

Components

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: 0064-laravel-policies
Download link: https://github.com/MrJmpl3/codex_____data_____configuration/archive/main.zip#0064-laravel-policies

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.