I am using laravel spatie permission package.
I have three guard named...
- web
- api
- customer
Problem
There is no role named 'customer'
I created a customer role with customer guard.
auth.php
'defaults' => [
'guard' => 'web',
'passwords' => 'users',
],
'guards' => [
'customer' => [
'driver' => 'session',
'provider' => 'users',
],
'web' => [
'driver' => 'session',
'provider' => 'users',
],
'api' => [
'driver' => 'token',
'provider' => 'users',
'hash' => false,
],
],
Here i changed guard order that that the official documentation followed.
Main question
The documentation says if i had multiple guard than add $guard_name
property inside User model. but if i have more guards how to declare this specific guard.