laravel-permission
Manage user roles and permissions in Laravel applications
All Skills in This Repository (1)
Pure Emerald Level IndicatorsFrequently Asked Questions
FAQPage SchemaHow to install laravel-permission?โผ
Run `npx skills add spatie/laravel-permission --all -g -y` in your terminal to install all tools in this suite globally.
How to add roles and permissions in Laravel?โผ
Add the HasRoles trait to your User model, then create roles and permissions and assign them with simple methods like assignRole and givePermissionTo.
How to protect Laravel routes by role?โผ
Register the package middleware aliases and apply them to routes, for example role:admin or permission:edit articles, to block unauthorized users automatically.
Does laravel-permission support teams and multi-tenancy?โผ
Yes. Enable the teams option in the config file before migrating, then set the active team ID so roles and permissions are scoped per team.
Can I check permissions in Blade templates?โผ
Yes. Use the standard @can directive or the package's @role and @hasanyrole directives to show or hide content based on user access.
Related Repositories in Software Engineering
View All in Software Engineeringโopenclaw
Run a personal AI assistant across your devices and chat apps
superpowers
Gives coding agents a disciplined workflow from idea to merged code
react
AI agent skills for building, testing, and porting React core