Questions tagged [entrust]

Entrust is a plugin to add role-based permissions to Laravel.

115 questions
1
vote
0 answers

How to use role based access in laravel using entrust

I am using Laravel 5.4. I want to assign all authority to 'Admin' role. But Employee cannot delete or edit records. I'm using Entrust Package for Role based permission. I've written routes for this but unfortunately Its not working for employee.…
Rizwan Saleem
  • 376
  • 4
  • 17
1
vote
2 answers

How to fix Laravel BadMethodCallException when using Entrust

Always getting the [BadMethodCallException] This cache store does not support tagging. when ever i try to run a database command that include the save function it produce this error and i think is because of the Entrust. On the…
dagogodboss
  • 483
  • 1
  • 4
  • 19
1
vote
1 answer

Laravel 5 can't login using Entrust

I've been trying to get Entrust working with Laravel 5 following the instruction here https://github.com/Zizaco/entrust I've made all the changes as requested, added users and roles (I haven't added permissions as I won't need to check them...just…
AdRock
  • 2,959
  • 10
  • 66
  • 106
1
vote
1 answer

Laravel redirects to login on every page even after logging in

I'm having problems with Laravel since i removed Entrust. Everything was working fine until i tried installing Entrust. I removed it because it kept saying the following message the same as this question Laravel cache store does not support…
AdRock
  • 2,959
  • 10
  • 66
  • 106
1
vote
1 answer

how to fixe occured errors after using entrust package with laravel

I followed a tutorial on how to use roles, permissions... with a laravel app. I am using entrust package this the interface : But, I am facing 2 errors, (i ll talk about both of them in the same topic, cause I thought maybe they caused by same…
Naj
  • 119
  • 1
  • 2
  • 13
1
vote
0 answers

Laravel - Add accessor to Zizaco Entrust

I'm using Laravel and Zizaco Entrust package. I have the table role_user with two columns, role_id and user_id. Now I would add a third column, like company_id so the same user can had different role in different company. In RoleUser model, i have…
cent89
  • 113
  • 1
  • 9
1
vote
3 answers

Laravel 5.3 Entrust - Class name must be a valid object or a string

I'm currently working on a delete function for my roles. Every time when I try to delete: Class name must be a valid object or a string How do I fix this?
user7136252
1
vote
1 answer

Add multiple permissions to one role entrust Role-based Permissions for Laravel 5

I just add entrust to Laravel project, i can create role, create permission , attachPermission, assignRole. Now i want to attach multiple permissions to one Role ,for example i add this permissions [create-user,edit-user,remove-user,update-user]…
A.khalifa
  • 2,366
  • 3
  • 27
  • 40
1
vote
1 answer

Laravel 5.2, Entrust, 'role_user' table not updating

So I'm working with Laravel 5.2 and Entrust package to manage roles/permissions I'm building a function which should add a user to the 'users' table simultaneously add a relationship to the 'role_user' table. I'm passing an array from a multi_select…
SGouws
  • 321
  • 1
  • 12
1
vote
1 answer

PHP Fatal error: Class 'User' not found in eval()'d code on line 1

I'm using ENTRUST (Laravel 5 Package). When I use command User::all(); in Php artisan tinker's Shell command line. It gives me error PHP Fatal error: Class 'User' not found in eval()'d code on line 1 but after trying 2-3 different…
Kartik
  • 71
  • 1
  • 2
  • 11
1
vote
2 answers

Laravel 5.2 With Entrust GroupRoutes Kernel.php

I am trying to add Route::group() based on a users role. Route::group(['middleware' => ['role:myrole']], function () { //Some Routes } I am getting this error... Missing argument 3 for Zizaco\Entrust\Middleware\EntrustRole::handle() I have…
maddog_94
  • 21
  • 4
1
vote
0 answers

Fine grain permissions control in Laravel

I'm a novice Laravel developer trying to revamp the permissions system on an existing app that uses a very messy, in-house developed system. I'm trying to switch over to a cleaner, more maintainable solution. I'm trying to use zizaco/entrust but…
brianfr82
  • 271
  • 1
  • 5
  • 19
1
vote
2 answers

How to assign guest a role & permissions

I am currently trying to assign any guest the role 'Guest' so that they can have permissions. I currently have the following code, which is apart of some middleware, this seems to be the wrong place to have it, I would assume there is a much better…
Ian
  • 3,539
  • 4
  • 27
  • 48
1
vote
1 answer

Laravel routes with entrust

I try to Entrust in my Laravel code. At this moment I have users, permisions and roles. create admin panel where you want to access the "permissions" == "admin - panel" I wish it was done by the file routes.php My…
bradley546994
  • 630
  • 2
  • 12
  • 30
1
vote
0 answers

Laravel Entrust Attach Role

I am Trying to attach default role to user when a user gets register. But getting error ErrorException in SessionGuard.php line 418: Argument 1 passed to Illuminate\Auth\SessionGuard::login() must implement interface …
Rahman Qaiser
  • 664
  • 5
  • 18