1 | <?php |
||
8 | class AppsServiceProvider extends ServiceProvider |
||
9 | { |
||
10 | /** |
||
11 | * Bootstrap the service provider. |
||
12 | * |
||
13 | * @return void |
||
14 | */ |
||
15 | 6 | public function boot() |
|
21 | |||
22 | /** |
||
23 | * Publish assets from package. |
||
24 | * |
||
25 | * @return void |
||
26 | */ |
||
27 | 6 | protected function publishAssets() |
|
35 | |||
36 | /** |
||
37 | * Register the service provider. |
||
38 | * |
||
39 | * @return void |
||
40 | */ |
||
41 | 8 | public function register() |
|
51 | |||
52 | /** |
||
53 | * Setup package assets. |
||
54 | * |
||
55 | * @return void |
||
56 | */ |
||
57 | 8 | protected function setupAssets() |
|
61 | |||
62 | /** |
||
63 | * Register app manager singleton. |
||
64 | * |
||
65 | * @return void |
||
66 | */ |
||
67 | protected function registerAppManager() |
||
75 | |||
76 | /** |
||
77 | * Register the configured service providers. |
||
78 | * |
||
79 | * @return void |
||
80 | */ |
||
81 | 8 | protected function registerConfiguredProviders() |
|
82 | { |
||
83 | 8 | $providers = $this->app['config']->get('apps.providers', []); |
|
84 | |||
85 | 8 | if ($this->app->runningInConsole()) { |
|
86 | 6 | $providers = array_unique(Arr::flatten($providers)); |
|
87 | } else { |
||
88 | 2 | $providers = (array) Arr::get($providers, $this->app['apps']->id()); |
|
89 | } |
||
90 | |||
91 | 8 | array_walk($providers, function ($p) { |
|
92 | 2 | $this->app->register($p); |
|
93 | 8 | }); |
|
94 | 8 | } |
|
95 | |||
96 | /** |
||
97 | * Setup application configurations. |
||
98 | * |
||
99 | * @return void |
||
100 | */ |
||
101 | 8 | protected function setupConfiguration() |
|
117 | } |
||
118 |