Entrust is a plugin to add role-based permissions to Laravel.
Questions tagged [entrust]
115 questions
0
votes
1 answer
Entrust @role and @permission directives not rendering in blade, laravel 5.6
Let me tell you the points.
I am using Entrust by https://github.com/Zizaco/entrust/
I am using multi-auth i.e I have 2 guards as web for users table and admin guard for admins table.
In admins table there are users with multiple permissions (roles…

Dinesh Suthar
- 853
- 1
- 17
- 41
0
votes
2 answers
Laravel Entrust Permissions disable text input
I'm trying to use a permission where if a user have it then the user will be able to edit a text field in a form, otherwise, the field will be disabled.
I know I can add a disabled parameter here {{ Form::text('name', ['disabled' => 'disabled']) }}…

Salam
- 1,126
- 14
- 20
0
votes
1 answer
Laravel 5.5 Entrust using middleware to grant permissions on route groups fails
I'm using entrust for my laravel 5.5 project to provide an ACL system. As I try to use a middleware in my routes to filter access it falls in the following case
Route::group(['middleware' => ['role:admin', 'role:hr']],
function ()…

fefe
- 8,755
- 27
- 104
- 180
0
votes
1 answer
How to cache permission and role?
I use https://github.com/Zizaco/entrust
Because to many same requests

Vaaassaa
- 29
- 1
- 7
0
votes
2 answers
middleware on role Zizaco/entrust on controller but if user dont have the role it gives HttpException
So in my laravel project i have 3 roles admin employee vendor and each have theyre controllers in the controllers i have put the middleware of the role it and it works no problem but i don't like the thing when a user dont have the role it gives…

Mohammad hayajneh
- 623
- 2
- 11
- 32
0
votes
0 answers
ziccaco/entrust laravel permission and role i cant change a role name
I'm using this libs for managing roles on my web app: https://github.com/Zizaco/entrust
in the code I use the middleware like:
Route::group(['prefix' => 'admin', 'middleware'=>['auth','role:admin']], function () {
Route::get('/',…

JahStation
- 893
- 3
- 15
- 35
0
votes
1 answer
Laravel 5.5 and Entrust
I am trying to apply roles and permission on Laravel 5.5 with Entrust.
I used this, as the documentation inside the: App\models\Role.php
user7678643
0
votes
1 answer
Laravel ACL with Entrust, how to protect routes, controller methods
How do I check with Entrust if user has permission on route.
I have in my permissions table a route field and the name of the action
for example
can_update_profile, can_delete_profile, can_see_profile
than having the roles I'm adding to each one…

fefe
- 8,755
- 27
- 104
- 180
0
votes
2 answers
laravel entrust how to check a role's permission in blade?
I am using entrust in my laravel project.
In blade file when I edit a role I want to display all the permissions with checkbox.
But I stuck at the thought that I want the checkbox status is checked if the role has the permission.I pass the role and…

Evol Rof
- 2,528
- 2
- 22
- 37
0
votes
0 answers
How to redirect after login using entrust package in laravel 5.4
It's not working auto redirect role based after login.
Route::group(['middleware' => 'auth'], function () {
/*Route::get('/', function () {
return view('general');
});*/
Route::resource('users', 'UserController');
…

Tanay
- 1
- 2
- 4
0
votes
0 answers
Laravel Allow user with super-admin role only via Auth
I had implemented entrust for roles and permissions. I have 3 Roles, super-admin, admin and customer.
Super Admin has access to Web-app (eg. www.myurl.com)
Admin has access through api only i.e. mobile app (eg. www.myurl.com/api/login) via api.php…

Tarunn
- 1,038
- 3
- 23
- 45
0
votes
1 answer
Call to undefined method Illuminate\Database\Query\Builder::attachPermissions()
I know this is already an overly discussed problem, but I believe I'm not making the mistake commonly made. I'm getting this error when using the Entrust package for Laravel to create roles and permissions. I'm trying to attach permissions to roles…

ankush981
- 5,159
- 8
- 51
- 96
0
votes
0 answers
Laravel Entrust Role & Permissions
Hello i want to be able to assign permissions to roles from my admin panel i am getting the permissions foreach role but i canot save them see the
Photo i want now to check the boxes and to sync the checked boxes with the database so the…

Eth0
- 43
- 1
- 2
- 12
0
votes
1 answer
Laravel DataTables queries and Entrust
I am using Laravel 5.3 with Laravel Datatables and Entrust
On my index action I display a list of records in a datatable. Now I need to integrate entrust in to it. If the user is an admin they can see all leads. However, if the user is a normal user…

showFocus
- 701
- 2
- 8
- 21
0
votes
1 answer
Laravel entrust 5.2.x class permission not found while seeding
As above the title, I followed the tutorial to create ACL modal in laravel 5.2 , the bug hit as the attached when I was seeding a class for PermissionTableSeeder.
Well, I hope there are people who can help me on this issue.
This is the bug:

Jeffrey Cheong
- 348
- 3
- 13