| Conditions | 4 |
| Paths | 6 |
| Total Lines | 17 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 46 | private static function getAuthMiddleware() |
||
| 47 | { |
||
| 48 | $auth_middleware = 'auth.basic'; |
||
| 49 | |||
| 50 | try { |
||
| 51 | if (class_exists(\Illuminate\Contracts\Auth\Factory::class)) { |
||
| 52 | $manager = App::make(\Illuminate\Contracts\Auth\Factory::class); |
||
| 53 | if ($manager->guard('api')) { |
||
| 54 | $auth_middleware = 'auth:api'; |
||
| 55 | } |
||
| 56 | } |
||
| 57 | } catch (\Exception $e) { |
||
|
|
|||
| 58 | |||
| 59 | } |
||
| 60 | |||
| 61 | return $auth_middleware; |
||
| 62 | } |
||
| 63 | } |
||
| 64 |