Questions tagged [laravel-permission]

Laravel permission is a 3rd party Laravel package developed by Spatie to manage user permissions and roles in a database.

Laravel permission is a 3rd party Laravel package to manage user permissions and roles in a database.

It is maintained by Spatie, a Belgian company that creates websites and web application. This is one of many Laravel packages they maintain.

It can be installed using composer via the following command:

composer require spatie/laravel-permission

Links:

261 questions
-1
votes
2 answers

Use phpunit with Laravel and Spatie

I try to use phpunit with Laravel and Spatie but i have a issue. I have this test : public function testBasicTest() { $user = User::where('id', 2)->first(); $response = $this->actingAs($user, 'api')->json('POST',…
Zekura
  • 317
  • 4
  • 13
-1
votes
2 answers

Getting result only for a specified id in Eloquent

I have a little problem. My code is working, but I think I'm not doing it the proper way. In my GradeController i have this code: /** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { …
Tomek Greber
  • 5
  • 1
  • 7
-2
votes
1 answer

How to Upgrade Laravel 5.4 to Laravel 7.12

In my old project laravel 5.4, use zizaco/entrust and it's doesn't support laravel 7. So I would like to use spatie/laravel-permission. Could you please guide me how to do it.
HKimhab
  • 1
  • 1
  • 3
-2
votes
2 answers

How to check same set of permissions assigned to another role?

I am using spatie permission package in Laravel and I want to make sure that two roles with different names must not have same permissions while creating a role e.g Role A - Pemission 1 - Permission 2 - Permission 3 Role B - Pemission 1 -…
-2
votes
1 answer

How to restrict aceess to route which is common for 5 roles in laravel 5?

In laravel I have declared five different roles like admin,client,employee. I need to restrict user from accessing url based on their roles.
-2
votes
1 answer

How to upgrade spatie/laravel-permission V1 to V2

On the second version of the database structure and the library is different. how to make an update without breaking anything? spatie/laravel-permission
Coder
  • 23
  • 8
1 2 3
17
18