Skip to content

Commit

Permalink
Merge branch '11.x' of https://github.com/laravel/framework into 11.x
Browse files Browse the repository at this point in the history
  • Loading branch information
milwad-dev committed Mar 8, 2024
2 parents 2e8c7f2 + bb80a3b commit b585aef
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/Illuminate/Foundation/Console/ApiInstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ class ApiInstallCommand extends Command
protected $signature = 'install:api
{--composer=global : Absolute path to the Composer binary which should be used to install packages}
{--force : Overwrite any existing API routes file}
{--passport : Install Laravel Passport instead of Laravel Sanctum}';
{--passport : Install Laravel Passport instead of Laravel Sanctum}
{--without-migration-prompt : Do not prompt to run pending migrations}';

/**
* The console command description.
Expand Down Expand Up @@ -69,8 +70,10 @@ public function handle()

$this->components->info('API scaffolding installed. Please add the [Laravel\Passport\HasApiTokens] trait to your User model.');
} else {
if ($this->confirm('One new database migration has been published. Would you like to run all pending database migrations?', false)) {
$this->call('migrate');
if (! $this->option('without-migration-prompt')) {
if ($this->confirm('One new database migration has been published. Would you like to run all pending database migrations?', true)) {
$this->call('migrate');
}
}

$this->components->info('API scaffolding installed. Please add the [Laravel\Sanctum\HasApiTokens] trait to your User model.');
Expand Down

0 comments on commit b585aef

Please sign in to comment.