spatie-integration
CommunitySeamless Spatie permissions & translations in Laravel
System Documentation
What problem does it solve?
This Skill helps Laravel applications implement robust access control and multilingual models using Spatie's permissions package and Translatable models, reducing boilerplate and errors.
Core Features & Use Cases
- RBAC with roles and permissions: Define and enforce role-based access across controllers, routes, and policies.
- Translatable models: Build models whose attributes are stored in multiple locales with automatic fallback support.
- Authorization policies & middleware: Centralize permission checks in policies and protect resources via middleware.
Use Case: A multilingual CMS where editors manage content in several locales while admins control access to admin sections via roles and permissions.
Quick Start
Install the required packages with Composer: composer require spatie/laravel-permission spatie/laravel-translatable. Run migrations: php artisan migrate. Seed initial roles and permissions and attach them to models. Protect routes with middleware 'permission:*' and implement policies to enforce access.
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: spatie-integration Download link: https://github.com/Saidabbos/homemessage-admin/archive/main.zip#spatie-integration 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 223,000+ vetted skills library on demand.