src/helpers.php 1 location
|
@@ 8-14 (lines=7) @@
|
5 |
|
* |
6 |
|
* @return string|null |
7 |
|
*/ |
8 |
|
function getModelForGuard(string $guard) |
9 |
|
{ |
10 |
|
return collect(config('auth.guards')) |
11 |
|
->map(function ($guard) { |
12 |
|
return config("auth.providers.{$guard['provider']}.model"); |
13 |
|
})->get($guard); |
14 |
|
} |
15 |
|
|
src/Traits/HasPermissions.php 1 location
|
@@ 120-126 (lines=7) @@
|
117 |
|
/** |
118 |
|
* Get an array of all models assigned to guards with the guard names as the keys. |
119 |
|
*/ |
120 |
|
protected function getAllAuthGuardProviderModels(): array |
121 |
|
{ |
122 |
|
return collect(config('auth.guards')) |
123 |
|
->map(function ($guard) { |
124 |
|
return config("auth.providers.{$guard['provider']}.model"); |
125 |
|
})->toArray(); |
126 |
|
} |
127 |
|
|
128 |
|
/** |
129 |
|
* Forget the cached permissions. |