File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
src/Illuminate/Foundation/Console Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,8 @@ class ApiInstallCommand extends Command
2121 protected $ signature = 'install:api
2222 {--composer=global : Absolute path to the Composer binary which should be used to install packages}
2323 {--force : Overwrite any existing API routes file}
24- {--passport : Install Laravel Passport instead of Laravel Sanctum} ' ;
24+ {--passport : Install Laravel Passport instead of Laravel Sanctum}
25+ {--without-migration-prompt : Do not prompt to run pending migrations} ' ;
2526
2627 /**
2728 * The console command description.
@@ -69,8 +70,10 @@ public function handle()
6970
7071 $ this ->components ->info ('API scaffolding installed. Please add the [Laravel\Passport\HasApiTokens] trait to your User model. ' );
7172 } else {
72- if ($ this ->confirm ('One new database migration has been published. Would you like to run all pending database migrations? ' , false )) {
73- $ this ->call ('migrate ' );
73+ if (! $ this ->option ('without-migration-prompt ' )) {
74+ if ($ this ->confirm ('One new database migration has been published. Would you like to run all pending database migrations? ' , true )) {
75+ $ this ->call ('migrate ' );
76+ }
7477 }
7578
7679 $ this ->components ->info ('API scaffolding installed. Please add the [Laravel\Sanctum\HasApiTokens] trait to your User model. ' );
You can’t perform that action at this time.
0 commit comments