entrust
entrust copied to clipboard
Role-based Permissions for Laravel 5
i used jwt.auth for authenticate and zizaco for authorization. when i use zizaco middlewares in api file, like bellow: Route::group(['middleware' => 'jwt.auth'], function(){ Route::group(['prefix' => 'admin', 'middleware' => ['role:admin']], function()...
Documentation states to run `php artisan vendor:publish` but it doesn't show up as a provider or tag.
These Test Using [Issue](https://github.com/Zizaco/entrust/issues/742) **Try 1:** ```
Is there any way to attach permission to multiple roles when creating a permission? `$permission = New Permission; foreach ($request->roles as $key => $value) { $permission->attachRole($value); }` I've tried this...
Does entrust cache his queries? A lot of people have an error "This cache store does not support targging" So I was wondering does entrust cache and how?
I followed the instructions on a fresh project on a fresh homebrew install for laravel 5. And I've encountered the following error when running `php artisan migrate`: ``` [Illuminate\Database\QueryException] SQLSTATE[HY000]:...
i use below code for remove one record from roles table: ``` if ( $role = Role::find($id)) { $role->delete(); return response()->json(['status' => 'success', 'message' => 'operation was successful.']); } ```...
Seeding: RolesTableSeeder Seeding: PermissionsTableSeeder Seeding: RoleUserTableSeeder Illuminate\Database\QueryException : SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`laravel-project`.`role_user`, CONSTRAINT `role_user_user_id_for eign` FOREIGN...
If you run the script to publish the migrations and later run the migrations you get an error because Laravel 5.8 uses big integer instead of Integer for its user...
Basically I just want to count users based on there roles, something like this: ``` roles count admin 4 user 2 $role_name $User_withthisRole_count ``` not sure what to do..