blessing-skin-server/database/update_scripts/update-4.0.4-to-4.1.1.php

21 lines
647 B
PHP
Raw Normal View History

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