laravel-entrust-role-permission-panel icon indicating copy to clipboard operation
laravel-entrust-role-permission-panel copied to clipboard

Simple example to assign permissions to roles with Laravel and Entrust

Results 5 laravel-entrust-role-permission-panel issues
Sort by recently updated
recently updated
newest added

When registering trough built in Laravel registration no role is attached to user! What would be the bast way and where add it so role would be attached to user...

``` public function handle($request, Closure $next) { $user = $this->auth->user(); $permissions = $this->permission->all(); $uri = $request->route()->uri(); foreach($permissions as $permission) { if( ! $user->can($permission->name) && $permission->route == $uri) { abort(403); }...

&ltphp $checked = in_array($role->id, $userRoles->lists('id')); ?> fix like: &lt?php $checked = in_array($role->id, $userRoles->lists('id')->all()); ?>

Wanted to ask, what would be best way to impliment this? now I am using helpers.php where I check what is route, and if route = request I return active...