Fortress
Attribute-based authorization, declared on the method it protects. Roles, permissions, gates and ownership checks usually end up scattered across middleware and policies. Fortress puts them in one #[Authorize] attribute, next to the code.
use Laravelplus\Fortress\Attributes\Authorize;class PostController{ #[Authorize( public: false, roles: ['admin', 'editor'], permissions: ['create', 'update'], owner: App\Models\Post::class, overrideKey: 'author_id' )] public function update(Request $request, $id) { // Update logic }}$ composer require laravelplus/fortress$ php artisan vendor:publish --provider="Laravelplus\\Fortress\\FortressServiceProvider"Powerful tools out of the box.
Roles, permissions, gates and ownership checks usually end up scattered across middleware and policies. Fortress puts them in one #[Authorize] attribute, next to the code.
#[Authorize] attribute
Roles, permissions, gates and ownership in one declarative attribute.
Roles & permissions
Allow a method when the user holds one of the listed roles or permissions.
Ownership checks
Compare a model's owner key with the signed-in user, with a per-method override key.
Laravel gates
Reuse the gates you already define, by name.
Public endpoints
Mark a method public: true and it skips the checks entirely.
Configurable
Default ownership keys, gates and behaviour live in config/fortress.php.
Set up Fortress and start using it today.
Requires PHP 8.2+ and Laravel 11. Every step copies with one click.
The details.
One middleware
Append AttributeAuthorizationMiddleware to the web group once. From then on every controller method is checked against its own attribute.
Less middleware clutter
No stack of route middleware per endpoint: the rule reads where the method is, and a reviewer sees it in the same diff.
More packages.
Laravel Updater
Keep your project in step with the starter kit it came from.
laravelplus/laravel-updaterUser History
A searchable record of what your users did, and to what.
laravelplus/user-historyVersion Manager
Tell users what's new since the last version they saw.
laravelplus/version-platform-managerCommander
Run, track and audit artisan commands from the browser.
laravelplus/commanderFeature Requests
A feature-request board with voting, inside your own app.
laravelplus/feature-requests