Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Permission Manager

Permission Manager Laravel Package

l5starter/permission-manager

Laravel 5.4 permission/role manager for L5Starter Admin, built on spatie/laravel-permission. Provides migrations, seeders, and admin UI/menu entries for managing roles and permissions; add HasRoles to User and protect routes with a simple role middleware.

View on GitHub
Deep Wiki
Context7

Permission Manager

Frequently asked questions about Permission Manager
What Laravel versions does this package support?
This package is explicitly designed for Laravel 5.4 and may work with 5.4–5.8. The `5.4.x-dev` tag suggests it’s tailored for legacy projects, so test thoroughly if using newer versions. Laravel 8+ is not officially supported due to architectural changes.
How do I integrate this with an existing L5Starter Admin setup?
Add the package via Composer, register its service provider in `config/app.php`, publish migrations/seeders, and include the sidebar menu entries in `resources/views/vendor/l5starter/admin/partials/sidebar.blade.php`. Ensure your User model uses `HasRoles` from Spatie’s package.
Can I customize the admin UI for roles/permissions?
Yes, override the Blade templates in `resources/views/vendor/l5starter/permission-manager/` or extend CSS/JS via Laravel Mix. The package assumes Bootstrap + Font Awesome, so conflicts may arise if your admin uses different assets.
What if I only need Spatie’s permission system without the admin UI?
Skip this package and use `spatie/laravel-permission` directly. It provides the core RBAC functionality (roles, permissions, middleware) without the admin scaffolding. This is the recommended approach for Laravel 8+ projects.
How do I protect routes using roles/permissions?
Create a custom middleware (e.g., `RoleMiddleware`) to check roles with `$request->user()->hasRole($role)`. Register it in `app/Http/Kernel.php` and apply it to routes like `Route::middleware(['role:admin'])->group(...);`.
Are there performance concerns with role checks in high-traffic routes?
Role checks via Spatie’s package are optimized but may add minor overhead. Cache role assignments for users if performance is critical. Test under load, especially if roles/permissions are frequently queried.
What happens if this package stops being maintained?
Fork the repository or migrate to alternatives like `spatie/laravel-permission` + a custom admin UI. The package is a thin wrapper around Spatie’s package, so core functionality remains usable. Plan for this risk upfront.
Can I use this with Laravel Sanctum or Passport for API auth?
Yes, but ensure no conflicts with middleware or user model traits. Sanctum/Passport’s auth systems work alongside Spatie’s `HasRoles` trait. Test role checks in API routes using middleware like `role:admin` or `can:access-resource`.
How do I handle route conflicts with existing admin panels?
The package uses `admin/roles*` and `admin/permissions*` routes by default. Rename these in the package’s route files or use middleware to guard existing admin routes. Override the `routes/web.php` entries if needed.
What’s the backup plan if migrations or seeders don’t work?
Manually create the `roles` and `permissions` tables using Spatie’s migration files (published via `vendor:publish`). For seeders, copy the logic from `RolesTableSeeder` into a custom seeder. Always back up your database before running migrations.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor