Commit c605eb59 authored by Nicolas Widart's avatar Nicolas Widart

Merge commit '337ca737'

* commit '337ca737':
  Squashed 'Modules/Core/' changes from aa20d4a..0a5e9bc
parents 2a0a6a4d 337ca737
...@@ -40,7 +40,6 @@ class CoreServiceProvider extends ServiceProvider ...@@ -40,7 +40,6 @@ class CoreServiceProvider extends ServiceProvider
*/ */
public function register() public function register()
{ {
$this->loadModuleProviders();
$this->registerMenuRoutes(); $this->registerMenuRoutes();
$this->registerFilters($this->app['router']); $this->registerFilters($this->app['router']);
$this->registerCommands(); $this->registerCommands();
...@@ -56,24 +55,6 @@ class CoreServiceProvider extends ServiceProvider ...@@ -56,24 +55,6 @@ class CoreServiceProvider extends ServiceProvider
return array(); return array();
} }
/**
* Load the Service Providers for all enabled modules
*/
private function loadModuleProviders()
{
$this->app->booted(function ($app)
{
$modules = $app['modules']->enabled();
foreach ($modules as $module) {
if ($providers = $app['modules']->prop("{$module}::providers")) {
foreach ($providers as $provider) {
$app->register($provider);
}
}
}
});
}
/** /**
* Register the filters. * Register the filters.
* *
......
...@@ -13,7 +13,11 @@ ...@@ -13,7 +13,11 @@
"mcamara/laravel-localization": "dev-Laravel5Support" "mcamara/laravel-localization": "dev-Laravel5Support"
}, },
"active": 1, "active": 1,
"priority": 1,
"providers": [ "providers": [
"Modules\\Core\\Providers\\RoutingServiceProvider" "Modules\\Core\\Providers\\RoutingServiceProvider"
],
"files": [
"start.php"
] ]
} }
<?php <?php
/*
|--------------------------------------------------------------------------
| Register The Module Namespaces
|--------------------------------------------------------------------------
|
| Here is you can register the namespace for this module.
| You may to edit this namespace if you want.
|
*/
View::addNamespace('core', __DIR__ . '/Resources/views/');
Lang::addNamespace('core', __DIR__ . '/Resources/lang/');
Config::addNamespace('core', __DIR__ . '/Config/');
/*
|--------------------------------------------------------------------------
| Require The Routes file.
|--------------------------------------------------------------------------
|
| Next, this module will load filters and routes file.
|
*/
require __DIR__ . '/Http/routes.php'; require __DIR__ . '/Http/routes.php';
require __DIR__ . '/composers.php'; require __DIR__ . '/composers.php';
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment