Questions tagged [entrust]

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

115 questions
2
votes
1 answer

Laravel 5.2 Dynamic Role and Permission assigning and checking

I'm using Laravel 5.2 with Entrust to manage users roles and permissions. Till now I've been protecting my routes bu using middlewares like this : Route::get( 'roles', [ 'as' => 'roles.index', 'uses' => 'RoleController@index', 'middleware' =>…
Pranab
  • 191
  • 1
  • 11
2
votes
3 answers

issue in deleting role in Zizaco/entrust

Iam trying to delete a role $role = Role::findOrFail(1); $role->delete(); I got the following error FatalErrorException in Model.php line 945: Class name must be a valid object or a string in vendor/zizaco/entrust/src/commands/MigrationCommand.php…
2
votes
0 answers

Laravel 5.2: Authenticate Controller action Role wise using Entrust

New in laravel. I have done this in Yii And it is pretty much easy. :) Laravel Version: 5.2 Entrust Version: dev-laravel-5 Let me explain my requirement. I have two role manager and ceo. and they have following permissions. In PostController: …
Khush
  • 76
  • 1
  • 5
2
votes
3 answers

Laravel 5.2: Integrate entrust package, create role and permissions and access it

I am totally new in laravel. I install laravel 5.2 . I have done with CRUD in laravel. Now i want to integrate laravel authentication package. so i choose zizaco\entrust. I follow each steps from doc link. but i don't understand what is wrong. In…
Dhara
  • 1,431
  • 4
  • 29
  • 47
2
votes
1 answer

Laravel Entrust change table name

I'm using laravel 5.2 multi auth so I have created a new management table instead of user table. I have installed Entrust for roles and permissions. During the entrust installation, I have changed entrust:migration content as: public function…
ehsan khodayar
  • 63
  • 2
  • 11
2
votes
1 answer

Should I use Laravel's Authorization or Zizaco's Entrust?

Laravel 5.1.11 already has been updated with Authorization. Zizaco's Entrust has been around for a while now. Which should we use in authorising users?
doncadavona
  • 7,162
  • 9
  • 41
  • 54
1
vote
0 answers

sun.security.x509.X509CertImpl cannot be cast to iaik.x509.X509Certificate

i extracted a certificate from a JKS keystore and attempted to cast it to iaik.x509.X509Certificate. it failed with sun.security.x509.X509CertImpl cannot be cast to iaik.x509.X509Certificate. is there a way to write it to iaik.x509.X509Certificate…
Olaoluwa
  • 66
  • 12
1
vote
1 answer

Double boot function causes trait collusion

The laravel debugger is showing me this error: Trait method boot has not been applied, because there are collisions with other trait methods on App\User If i remove one of those traits, Uuids or Entrust the error doesn't show. But i need them both.…
DutchPrince
  • 333
  • 2
  • 16
1
vote
1 answer

In ProviderRepository.php line 208: Class 'Zizaco\Entrust\EntrustServiceProvider' not found error in laravel

I try to build Administration Module with Role-based permissions using Entrust package. then update composer.json file as follow: "require": { "php": ">=7.1.3", "fideloper/proxy": "~4.0", "laravel/framework": "5.5.*", …
sanduniYW
  • 723
  • 11
  • 19
1
vote
1 answer

Assigning permission to role while seeding - Entrust

Laravel 5.6.3 Entrust: 1.9 I am trying to seed only one row with this Seeder
1
vote
0 answers

Laravel 5.5: Entrust This cache store does not support tagging?

I am using Entrust (zizaco/entrust": "5.2.x-dev) for user roles and permissions, everything was working using CACHE_DRIVER=array. But I have another requirement to lock user on 5 failed login attempts to use that feature I must have to change cache…
Kalim
  • 487
  • 6
  • 18
1
vote
1 answer

reduce laravel queries call and memory usage

i face issue in my admin sidebar in laravel project, that i'm using zizaco/entrust package for permissions and roles. if i logging in as admin i see in debugger bar 134 queries called and 15.27 MB of memory usage. i comment some lines in side bar…
Sami Mansour
  • 75
  • 10
1
vote
1 answer

Trying to get users with their respective role but returns Class 'Role' not found

I'm on Laravel 5.4 and using Zizaco Entrust to handle roles and permissions in my app and I'm trying to pull all users that has a role of 'user' but it returns me this error (1/1) FatalErrorException Class 'Role' not found in HasRelationships.php…
Juliver Galleto
  • 8,831
  • 27
  • 86
  • 164
1
vote
2 answers

How to Deattach permissions from a role? (in laravel Freamwork and entrust package.)

i working whith entrust package in laravel for management roles and permissions. $role->deattachPermission($permission); its not work.
Farshid Rezaei
  • 751
  • 2
  • 10
  • 34
1
vote
1 answer

Laravel 5.4 with Entrust: How to get users with roles

I am trying to get all users with roles, but "roles" field is always an empty array. There are 4 users, 2 of them have at least 1 role attached, verified. UserController.php public function getUsers() { $users = User::select('name', 'email',…