Skip to content

Commit

Permalink
Updated InstallCommand.php
Browse files Browse the repository at this point in the history
  • Loading branch information
JakyeRU committed Dec 27, 2022
1 parent 6d86fd1 commit 9985f48
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/Console/Commands/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,19 @@ public function handle()
// Remove Laravel Breeze routes
$this->replaceBreezeRoutes();

// Asking the user to build the assets
if ($this->confirm('Do you want to build the assets?', true)) {
try {
shell_exec('npm install --silent');
shell_exec('npm run build --silent');
} catch (\Exception $e) {
$this->error($e->getMessage());
$this->comment('Please execute the "npm install && npm run build" command to build your assets.');
}
} else {
$this->comment('Please execute the "npm install && npm run build" command to build your assets.');
}

// Asking the user to migrate the database
if ($this->confirm('Do you want to run the migrations?', true)) {
try {
Expand All @@ -87,8 +100,6 @@ public function handle()
$this->warn('If the domain doesn\'t match your current environment\'s domain you need to set it manually in the .env file. (APP_URL)');

$this->info('Larascord has been successfully installed!');

$this->comment('Please execute the "npm install && npm run dev" command to build your assets.');
}

/**
Expand Down

0 comments on commit 9985f48

Please sign in to comment.