lectero / laragate
v0.1
2022-10-23 19:24 UTC
Requires (Dev)
- orchestra/testbench: ^7.0
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2025-03-06 12:18:32 UTC
README
Laragate is a simple package to help you to create a simple permission system for your Laravel App.
Installation
You can install the package via composer:
composer require lectero/laragate
Usage
1. Publish the config file
php artisan vendor:publish --provider="Lectero\Laragate\LaragateServiceProvider"
2. Create a new permission
php artisan make:permission "permission name"
3. Add the trait to your User model
use Lectero\Laragate\Traits\HasPermissions; class User extends Authenticatable { use HasPermissions; }
4. Add the middleware to your routes
Route::group(['middleware' => ['permission:permission name']], function () { // your routes });
License
The MIT License (MIT). Please see License File for more information.