Skip to content

Commit

Permalink
Fixes installation of passport (#50488)
Browse files Browse the repository at this point in the history
  • Loading branch information
nunomaduro committed Mar 12, 2024
1 parent dbbc93b commit 8f14a26
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 @@ -64,9 +64,12 @@ public function handle()
}

if ($this->option('passport')) {
$this->call('passport:install', [
'--uuids' => $this->confirm('Would you like to use UUIDs for all client IDs?'),
]);
Process::run(array_filter([
(new PhpExecutableFinder())->find(false) ?: 'php',
defined('ARTISAN_BINARY') ? ARTISAN_BINARY : 'artisan',
'passport:install',
$this->confirm('Would you like to use UUIDs for all client IDs?') ? '--uuids' : null,
]));

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

0 comments on commit 8f14a26

Please sign in to comment.