laravel-policies

Community

Define Laravel authorization policies and rules.

AuthorSivanwol
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Provides a structured approach to encapsulate per-resource authorization logic in Laravel, ensuring consistent access control.

Core Features & Use Cases

  • Policy classes implementing standard methods (viewAny, view, create, update, delete) plus custom actions (cancel, approve) to cover common workflow needs.
  • Integration with a central Permission enum to centralize permissions and simplify checks.
  • Ownership and state checks to enforce resource-level access based on user relationships and resource state.
  • Example policy (OrderPolicy) demonstrates typical patterns for route usage and in-controller checks.

Quick Start

Create an OrderPolicy class and bind it to your routes to enforce order permissions.

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: laravel-policies
Download link: https://github.com/Sivanwol/sabo-platfom/archive/main.zip#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 510,000+ vetted skills library on demand.