| Conditions | 3 |
| Paths | 2 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | public static function getGuardClassName(): string |
||
| 15 | { |
||
| 16 | $guard = Config::get('auth.defaults.guard'); |
||
| 17 | $guard = collect(config('auth.guards')) |
||
| 18 | ->map(function ($guard) { |
||
| 19 | if (! isset($guard['provider'])) { |
||
| 20 | return; |
||
| 21 | } |
||
| 22 | |||
| 23 | return config("auth.providers.{$guard['provider']}.model"); |
||
| 24 | })->get($guard); |
||
| 25 | |||
| 26 | return class_exists($guard) ? $guard : $guard = \Hamidrezaniazi\Laramist\Tests\Model\User::class; |
||
| 27 | } |
||
| 28 | } |
||
| 29 |