Total Complexity | 5 |
Total Lines | 38 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
5 | trait SessionGuardHelper |
||
6 | { |
||
7 | /** |
||
8 | * Fetch auth model from Laravel 5.2 auth config. |
||
9 | */ |
||
10 | protected function guardedModel() |
||
11 | { |
||
12 | return ($provider = config('auth.guards.admin.provider')) |
||
|
|||
13 | ? config('auth.providers')[$provider]['model'] |
||
14 | : null; |
||
15 | } |
||
16 | |||
17 | /** |
||
18 | * Fetch auth model from Administrator config or Laravel 5.1 auth config. |
||
19 | * |
||
20 | * @param $config |
||
21 | * |
||
22 | * @return mixed |
||
23 | */ |
||
24 | protected function authModel($config) |
||
25 | { |
||
26 | return $config->get('auth.model', config('auth.model')); |
||
27 | } |
||
28 | |||
29 | /** |
||
30 | * Fetch authentication model. |
||
31 | * |
||
32 | * @param $config |
||
33 | * |
||
34 | * @return null|mixed |
||
35 | */ |
||
36 | protected function fetchModel($config) |
||
43 | } |
||
44 | } |
||
45 |