Download the PHP package fireworkweb/laravel-gates without Composer
On this page you can find all versions of the php package fireworkweb/laravel-gates. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download fireworkweb/laravel-gates
More information about fireworkweb/laravel-gates
Files in fireworkweb/laravel-gates
Package laravel-gates
Short Description Permission handling for Laravel using Gates with Route Names
License MIT
Homepage https://github.com/fireworkweb/laravel-gates
Informations about the package laravel-gates
fireworkweb/laravel-gates
This package allows you to manage permissions using Gates with Route Names.
Installation
You can install the package via composer:
Package Middlewares
This package comes 2 middlewares:
Gate
- Checks current route gates, if no matching gate, breaksGateOptional
- Checks current route gates, if no matching gate, logs
You can add them inside your app/Http/Kernel.php
file.
Usage
Here is an example:
That will register a gate posts.edit
and on route posts/1/edit
it will check if you on App\Policies\Post@edit
injecting route parameters.
Commands
You have commands to help you find routes without gate:
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Daniel Polito
- All Contributors
License
The MIT License (MIT). Please see License File for more information.