blessing-skin-server/database/update_scripts/update-4.0.4-to-4.1.1.php
2019-05-19 05:49:44 +00:00

21 lines
647 B
PHP

<?php
\Illuminate\Console\Application::starting(function ($artisan) {
$artisan->resolveCommands([\Laravel\Passport\Console\KeysCommand::class]);
});
$tips = [];
Artisan::call('jwt:secret', ['--no-interaction' => true]);
Artisan::call('migrate', ['--force' => true]);
try {
Artisan::call('passport:keys', ['--no-interaction' => true]);
} catch (\Exception $e) {
$tips[] = nl2br(implode("\n", [
'您需要打开终端或 PowerShell 来执行这条命令:<code>php artisan passport:keys</code>',
'You need to open terminal or PowerShell and execute: <code>php artisan passport:keys</code>',
]));
}
return $tips;