Laragate is a simple package to help you to create a simple permission system for your Laravel App.
You can install the package via composer:
composer require lectero/laragate
php artisan vendor:publish --provider="Lectero\Laragate\LaragateServiceProvider"
php artisan make:permission "permission name"
use Lectero\Laragate\Traits\HasPermissions;
class User extends Authenticatable
{
use HasPermissions;
}
Route::group(['middleware' => ['permission:permission name']], function () {
// your routes
});
The MIT License (MIT). Please see License File for more information.