1 | <?php |
||
9 | class AdminServiceProvider extends ServiceProvider |
||
10 | { |
||
11 | /** |
||
12 | * @var array |
||
13 | */ |
||
14 | protected $commands = [ |
||
15 | Console\AdminCommand::class, |
||
16 | Console\MakeCommand::class, |
||
17 | Console\MenuCommand::class, |
||
18 | Console\InstallCommand::class, |
||
19 | Console\PublishCommand::class, |
||
20 | Console\UninstallCommand::class, |
||
21 | Console\ImportCommand::class, |
||
22 | Console\CreateUserCommand::class, |
||
23 | Console\ResetPasswordCommand::class, |
||
24 | Console\ExtendCommand::class, |
||
25 | Console\ExportSeedCommand::class, |
||
26 | Console\MinifyCommand::class, |
||
27 | Console\FormCommand::class, |
||
28 | Console\PermissionCommand::class, |
||
29 | ]; |
||
30 | |||
31 | /** |
||
32 | * The application's route middleware. |
||
33 | * |
||
34 | * @var array |
||
35 | */ |
||
36 | protected $routeMiddleware = [ |
||
37 | 'admin.auth' => Middleware\Authenticate::class, |
||
38 | 'admin.pjax' => Middleware\Pjax::class, |
||
39 | 'admin.log' => Middleware\LogOperation::class, |
||
40 | 'admin.permission' => Middleware\Permission::class, |
||
41 | 'admin.bootstrap' => Middleware\Bootstrap::class, |
||
42 | 'admin.session' => Middleware\Session::class, |
||
43 | ]; |
||
44 | |||
45 | /** |
||
46 | * The application's route middleware groups. |
||
47 | * |
||
48 | * @var array |
||
49 | */ |
||
50 | protected $middlewareGroups = [ |
||
51 | 'admin' => [ |
||
52 | 'admin.auth', |
||
53 | 'admin.pjax', |
||
54 | 'admin.log', |
||
55 | 'admin.bootstrap', |
||
56 | 'admin.permission', |
||
57 | // 'admin.session', |
||
58 | ], |
||
59 | ]; |
||
60 | |||
61 | /** |
||
62 | * Boot the service provider. |
||
63 | * |
||
64 | * @return void |
||
65 | */ |
||
66 | public function boot() |
||
80 | |||
81 | /** |
||
82 | * Force to set https scheme if https enabled. |
||
83 | * |
||
84 | * @return void |
||
85 | */ |
||
86 | protected function ensureHttps() |
||
93 | |||
94 | /** |
||
95 | * Register the package's publishable resources. |
||
96 | * |
||
97 | * @return void |
||
98 | */ |
||
99 | protected function registerPublishing() |
||
108 | |||
109 | /** |
||
110 | * Remove default feature of double encoding enable in laravel 5.6 or later. |
||
111 | * |
||
112 | * @return void |
||
113 | */ |
||
114 | protected function compatibleBlade() |
||
122 | |||
123 | /** |
||
124 | * Register the service provider. |
||
125 | * |
||
126 | * @return void |
||
127 | */ |
||
128 | public function register() |
||
136 | |||
137 | /** |
||
138 | * Setup auth configuration. |
||
139 | * |
||
140 | * @return void |
||
141 | */ |
||
142 | protected function loadAdminAuthConfig() |
||
146 | |||
147 | /** |
||
148 | * Register the route middleware. |
||
149 | * |
||
150 | * @return void |
||
151 | */ |
||
152 | protected function registerRouteMiddleware() |
||
164 | } |
||
165 |