We all love spatie/laravel-permission. It is the undisputed standard for handling roles and permissions in the Laravel ecosystem. But let's be honest: Building the UI for it is a chore.
Every time you start a new project, you find yourself building the same CRUD for Roles, the same grid of checkboxes for Permissions, and the same modal to assign them to Users.
Today, we are solving this once and for all.
Introducing beartropy/permissions: A comprehensive, drop-in UI for role management, built natively with Beartropy UI and Tables.
🛡️ What is it?
This package acts as a "GUI Wrapper" for Spatie's library. It gives you a production-ready interface to manage your security layer without writing a single line of frontend code.
Because it is built on top of beartropy/ui and beartropy/tables, it inherits all the features you love: Dark Mode, Responsiveness, and that signature polished look.
✨ Key Features
- Auto-Grouping: No more messy lists. Name your permissions
users.create, users.edit, and the UI automatically groups them into a "Users" section.
- User Management: Assign roles and direct permissions to users via a searchable data table.
- Livewire Powered: instant interactions, no page reloads.
- I18n Ready: Fully translated (Spanish & English included out of the box).
📦 Installation
Getting started takes less than 2 minutes.
1composer require beartropy/permissions
If you haven't installed Spatie yet, the package guides you through it. Just ensure your User model uses the standard trait:
1use Spatie\Permission\Traits\HasRoles;
2
3class User extends Authenticatable
4{
5 use HasRoles;
6}
🚀 Usage
You have two ways to use it.
Option 1: The Full Page
The package comes with a ready-to-use route. Just configure the prefix in config/beartropy-permissions.php and navigate to /permissions.
Option 2: Embedded Components
Want to show the Roles table inside your own Settings page? easy.
1<div class="p-6">
2 <h2 class="text-2xl font-bold mb-4">Role Management</h2>
3
4
5 <livewire:beartropy-permissions::roles-table />
6</div>
🧠 Smart Grouping Logic
The best feature is how it handles permission visualization. Instead of a random list of 50 checkboxes, we recommend using dot notation:
| Permission |
Visual Result |
posts.create |
Posts Group |
posts.delete |
Posts Group |
settings.edit |
Settings Group |
The UI automatically parses these dots and renders a beautiful, categorized grid inside the Role Modal.
🔒 Security & Middleware
Of course, you don't want just anyone accessing this panel. You can configure the middleware in the config file to ensure only Super Admins can enter.
1// config/beartropy-permissions.php
2'route_middleware' => ['web', 'auth', 'can:manage-permissions'],
Conclusion
Stop wasting days building the same "Admin > Roles" page for every client. Install Beartropy Permissions and focus on building the features that actually make your application unique.
Check out the full documentation on GitHub.