Total Complexity | 3 |
Total Lines | 33 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | class LaravelBackupPanel |
||
10 | { |
||
11 | /** |
||
12 | * The callback that should be used to authenticate Laravel Backup Panel users. |
||
13 | * |
||
14 | * @var Closure |
||
15 | */ |
||
16 | public static $authUsing; |
||
17 | |||
18 | /** |
||
19 | * Determine if the given request can access the Laravel Backup Panel dashboard. |
||
20 | * |
||
21 | * @param Request $request |
||
22 | * @return bool |
||
23 | */ |
||
24 | public static function check($request) |
||
25 | { |
||
26 | return (static::$authUsing ?: function () { |
||
27 | return App::environment('local'); |
||
28 | })($request); |
||
29 | } |
||
30 | |||
31 | /** |
||
32 | * Set the callback that should be used to authenticate Laravel Backup Panel users. |
||
33 | * |
||
34 | * @param Closure $callback |
||
35 | * @return static |
||
36 | */ |
||
37 | public static function auth(Closure $callback) |
||
42 | } |
||
43 | } |
||
44 |