@@ 215-224 (lines=10) @@ | ||
212 | /** |
|
213 | * @param $module |
|
214 | */ |
|
215 | protected function loadModuleProviders($module) |
|
216 | { |
|
217 | if (is_dir(base_path('app/Modules/' . $module . '/Providers'))) { |
|
218 | $serviceProviderStartPos = strlen(base_path('app/Modules/' . $module . '/Providers/')); |
|
219 | $files = glob(base_path('app/Modules/' . $module . '/Providers/*.php')); |
|
220 | foreach ($files as $file) { |
|
221 | $this->app->register($this->app->getNamespace() . "Modules\\$module\Providers\\" . substr($file, $serviceProviderStartPos, -4)); |
|
222 | } |
|
223 | } |
|
224 | } |
|
225 | ||
226 | /** |
|
227 | * @param $module |
|
@@ 229-238 (lines=10) @@ | ||
226 | /** |
|
227 | * @param $module |
|
228 | */ |
|
229 | protected function loadModuleCommands($module) |
|
230 | { |
|
231 | if (is_dir(base_path('app/Modules/' . $module . '/Console/Commands'))) { |
|
232 | $startPos = strlen(base_path('app/Modules/' . $module . '/Console/Commands/')); |
|
233 | $files = glob(base_path('app/Modules/' . $module . '/Console/Commands/*.php')); |
|
234 | foreach ($files as $file) { |
|
235 | $this->commands($this->app->getNamespace() . "Modules\\$module\Console\Commands\\" . substr($file, $startPos, -4)); |
|
236 | } |
|
237 | } |
|
238 | } |
|
239 | ||
240 | /** |
|
241 | * @param $module |