A Laravel package for adding role-based permissions and authorization to Laravel 9|10 applications.
Entrust is a Laravel package that adds role-based permissions (RBAC) to Laravel applications. It provides a simple way to define roles and permissions, assign them to users, and check authorization throughout the application. The package solves the problem of managing complex user permissions by offering an intuitive API and seamless integration with Laravel's ecosystem.
Laravel developers building applications that require granular user permissions and role-based access control, such as admin panels, multi-user platforms, or content management systems.
Developers choose Entrust for its clean, expressive syntax, deep integration with Laravel (including middleware, Blade directives, and Eloquent), and flexibility in handling complex permission scenarios without writing repetitive authorization logic.
Role-based Permissions for Laravel 5
Seamlessly integrates with Laravel's ecosystem through Blade directives (@role, @permission), middleware, and Eloquent traits, reducing boilerplate code for authorization logic.
Supports advanced features like wildcard permissions (e.g., admin.*), array-based role checks, and the ability() method for complex authorization scenarios with configurable options.
Includes route filtering (Entrust::routeNeedsPermission), soft delete handling, and multiple assignment methods, covering most RBAC needs from basic to advanced use cases.
Provides intuitive methods like hasRole() and can() with clear syntax, making authorization code readable and maintainable, as shown in the README examples.
Requires multiple manual steps: editing config files, creating custom models, running migrations, and handling service providers, which can be error-prone for quick setups.
As a forked project from an older version, it may lack regular updates and community support compared to more actively maintained alternatives like Spatie's Laravel Permission.
The README explicitly warns that soft deleting requires manual cleanup of pivot table data, adding development overhead and risk of data corruption if not handled carefully.
Relies on Eloquent many-to-many relationships for roles and permissions, which can lead to N+1 query issues or performance bottlenecks in applications with thousands of users or complex permission sets.
A full-stack framework for Laravel that takes the pain out of building dynamic UIs.
Debugbar for Laravel (Integrates PHP Debug Bar)
IDE Helper for Laravel
PHP Image Processing
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.