govindtomar / permission
User and Role Permission Package
Installs: 18
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Language:Blade
This package is auto-updated.
Last update: 2025-03-25 04:31:19 UTC
README
publish provider
php artisan vendor:publish --provider=GovindTomar\Permission\PermissionServiceProvider
Add middleware
'permission' => \App\Http\Middleware\AccessPermissionMiddleware::class,
Add in User Table
$table->unsignedBigInteger('role_id')->default(3); $table->foreign('role_id')->references('id')->on('roles');
Add in each controller
public function __construct(){ $this->middleware('permission'); }