Commit 52d696d0 authored by Nicolas Widart's avatar Nicolas Widart

Fix merge conflict

parents 58eec741 ec7b8142
......@@ -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.');
}
/**
......@@ -86,29 +101,39 @@ class InstallCommand extends Command
'email' => $email,
'password' => Hash::make($password),
];
$this->user->createWithRoles($userInfo, ['1']);
$this->user->createWithRoles($userInfo, ['admin']);
$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!');
}
......
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