laravel-permission

Implement RBAC in Laravel using Spatie Laravel Permission package.

1|Updated Mar 14, 2026
One-click install
npx skills add https://github.com/Jorge-Ivan/uam-hogar-nazareth-web --skill laravel-permission-jorge-ivan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel-permission
Source: https://github.com/Jorge-Ivan/uam-hogar-nazareth-web/tree/main/.claude/skills/laravel-permission
Command: npx skills add https://github.com/Jorge-Ivan/uam-hogar-nazareth-web --skill laravel-permission-jorge-ivan

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a robust framework for implementing Role-Based Access Control (RBAC) in Laravel applications, ensuring secure and granular user authorization.

Core Features & Use Cases

  • Role & Permission Management: Define and assign roles and permissions to users.
  • Route & UI Protection: Secure routes using middleware and protect UI elements with Blade directives.
  • Advanced Features: Supports multi-guard, teams (multi-tenancy), wildcard permissions, and super-admin bypass.
  • Use Case: In a content management system, you can define roles like 'Admin', 'Editor', and 'Viewer', assigning specific permissions (e.g., 'create articles', 'edit articles', 'view articles') to control user access across the application.

Quick Start

Use the laravel-permission skill to protect the '/admin/users' route with the 'admin' role middleware.

Frequently Asked Questions about laravel-permission

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up role-based access control in Laravel using Spatie?

Role-based access control in Laravel is implemented using Spatie to define roles and permissions, assign them to users, and secure routes via middleware. This framework integrates with Laravel's Gate for secure user management.

How do I protect Laravel routes and UI elements with permission middleware?

Laravel route protection uses middleware to enforce role-based permissions, while UI elements are secured using Blade directives. This prevents unauthorized users from accessing restricted routes or viewing sensitive interface components.

Can I use Spatie Laravel permission for multi-tenancy and multi-guard applications?

Spatie Laravel permission supports multi-guard, teams for multi-tenancy, and wildcard permissions. These features allow granular user authorization across different guard contexts and tenant boundaries within a single application.

How does Laravel RBAC handle super-admin bypass and wildcard permissions?

Laravel RBAC handles super-admin bypass by granting unrestricted access to assigned users, while wildcard permissions allow matching multiple permissions through a single definition. This simplifies broad access grants without listing individual permissions.

What is the best way to assign granular permissions in a Laravel CMS?

Assigning granular permissions in a Laravel CMS involves defining specific actions like 'create articles' and 'edit articles', then attaching them to roles like 'Admin' or 'Editor'. This secures user access across the application efficiently.