Commit 337ca737 authored by Nicolas Widart's avatar Nicolas Widart

Squashed 'Modules/Core/' changes from aa20d4a..0a5e9bc

0a5e9bc Add a priority
6fcc15e remove view namespace definitions from start file
8579470 Adding start.php to files array
bc6cb81 Remove the SP registering
d4ded44 Merge pull request #9 from AsgardCms/change-install-command
e1b9922 Add new modules migrations command
4a63d64 Add new modules to publish

git-subtree-dir: Modules/Core
git-subtree-split: 0a5e9bc40cd7e5efe8c6c23187dbd78951dfe919
parent 5be6994d
......@@ -120,6 +120,8 @@ class InstallCommand extends Command
private function runMigrations()
{
$this->call('module:migrate', ['module' => 'Setting']);
$this->call('module:migrate', ['module' => 'Menu']);
$this->call('module:migrate', ['module' => 'Media']);
$this->info('Application migrated!');
}
......@@ -149,6 +151,8 @@ class InstallCommand extends Command
private function publishAssets()
{
$this->call('module:publish', ['module' => 'Core']);
$this->call('module:publish', ['module' => 'Media']);
$this->call('module:publish', ['module' => 'Menu']);
}
/**
......
......@@ -40,7 +40,6 @@ class CoreServiceProvider extends ServiceProvider
*/
public function register()
{
$this->loadModuleProviders();
$this->registerMenuRoutes();
$this->registerFilters($this->app['router']);
$this->registerCommands();
......@@ -56,24 +55,6 @@ class CoreServiceProvider extends ServiceProvider
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.
*
......
......@@ -13,7 +13,11 @@
"mcamara/laravel-localization": "dev-Laravel5Support"
},
"active": 1,
"priority": 1,
"providers": [
"Modules\\Core\\Providers\\RoutingServiceProvider"
],
"files": [
"start.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__ . '/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