laravel-permission-development

Develop and manage Laravel Permission roles, middleware, guards, and Blade directives.

Updated Apr 17, 2026
One-click install
npx skills add https://github.com/thomiOmi/laravel-starterkit-api --skill laravel-permission-development-thomiomi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel-permission-development
Source: https://github.com/thomiOmi/laravel-starterkit-api/tree/main/.agents/skills/laravel-permission-development
Command: npx skills add https://github.com/thomiOmi/laravel-starterkit-api --skill laravel-permission-development-thomiomi

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires spatie/laravel-permission, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill simplifies the development and management of Laravel Permission features, including roles, permissions, middleware, policies, teams, and Blade directives, streamlining authorization and access control processes.

Core Features & Use Cases

  • Role and Permission Management: Create, assign, and manage roles and permissions efficiently.
  • Authorization Checks: Perform authorization checks using can() and related methods.
  • Middleware and Guards: Register and use middleware for role and permission checks.
  • Blade Directives: Utilize Blade directives for permission-based access control.
  • Super Admin Support: Facilitates Super Admin checks and overrides.
  • Policy and Enum Usage: Implement policies and use enums for roles and permissions.
  • Seeding and Teams: Seed roles and permissions and manage multi-tenancy with teams.
  • Events and Performance: Leverage events for role and permission changes and optimize performance with caching.
  • Use Case: Quickly set up a Laravel application with robust access control using Spatie Laravel Permission, including role-based access control for different user types.

Quick Start

Use the laravel-permission-development skill to assign the 'writer' role to a user with the ID 1.

Frequently Asked Questions about laravel-permission-development

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

FAQPage Schema
How do I set up roles and permissions in Laravel using Spatie?

To set up roles and permissions in Laravel, you need the Spatie Laravel Permission package. This allows you to create, assign, and manage roles and permissions efficiently, streamlining authorization and access control processes.

Can I use Blade directives for permission-based access control in Laravel?

Yes, you can use Blade directives for permission-based access control in Laravel. The Skill enables you to utilize these directives directly in your views to restrict content based on assigned user roles and permissions.

Does Spatie Laravel Permission support multi-tenancy with teams?

Yes, Spatie Laravel Permission supports multi-tenancy with teams. You can manage team-specific roles and permissions, seed them efficiently, and handle complex access control scenarios across different tenant groups.

What's the best way to perform authorization checks in Laravel applications?

The best way to perform authorization checks in Laravel is by using the can() method alongside middleware, guards, and policies. This approach ensures robust access control by verifying user permissions before executing actions.

How do I implement a Super Admin override for Laravel access control?

To implement a Super Admin override for Laravel access control, you can use the provided Super Admin support features. This facilitates specific checks and overrides, allowing a Super Admin to bypass standard permission restrictions.

How do I optimize Laravel permission checks for performance?

To optimize Laravel permission checks for performance, you can leverage caching and events. The Skill helps you leverage events for role and permission changes and optimize performance with caching to reduce database queries.