Commit ec7b8142 authored by Nicolas Widart's avatar Nicolas Widart

Squashed 'Modules/Core/' changes from b63dd42..e8e79e4

e8e79e4 Make sentinel migrations/seeds optional

git-subtree-dir: Modules/Core
git-subtree-split: e8e79e4002d7b0bc292eae14b75bd23dfcb27977
parent f00433ca
......@@ -57,15 +57,30 @@ class InstallCommand extends Command
$this->configureDatabase();
if ($this->confirm('Do you wish to init sentinel and create its first user? [yes|no]')) {
$this->runUserCommands();
}
$this->runMigrations();
$this->runSeeds();
$this->publishAssets();
$this->createFirstUser();
$this->blockMessage(
'Success!',
'Platform ready! You can now login with your username and password at /backend'
);
}
$this->publishAssets();
/**
*
*/
private function runUserCommands()
{
$this->runSentinelMigrations();
$this->runUserSeeds();
$this->createFirstUser();
$this->blockMessage('Success!', 'Platform ready! You can now login with your username and password at /backend');
$this->info('User commands done.');
}
/**
......@@ -91,24 +106,34 @@ class InstallCommand extends Command
$this->info('Admin account created!');
}
/**
* Run migrations specific to Sentinel
*/
private function runSentinelMigrations()
{
$this->call('migrate', ['--package' => 'cartalyst/sentinel']);
}
/**
* Run the migrations
*/
private function runMigrations()
{
$this->call('migrate', ['--package' => 'cartalyst/sentinel']);
$this->call('module:migrate', ['module' => 'Setting']);
$this->info('Application migrated!');
}
private function runUserSeeds()
{
$this->call('module:seed', ['module' => 'User']);
}
/**
* Run the seeds
*/
private function runSeeds()
{
$this->call('module:seed', ['module' => 'User']);
$this->info('Application seeded!');
}
......@@ -194,4 +219,5 @@ class InstallCommand extends Command
$this->laravel['config']['database.connections.mysql.username'] = $databaseUsername;
$this->laravel['config']['database.connections.mysql.password'] = $databasePassword;
}
}
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