Register command at setup

This commit is contained in:
Pig Fang 2019-05-02 22:52:37 +08:00
parent f297788806
commit d519a4824a

View File

@ -137,6 +137,9 @@ class SetupController extends Controller
'site_name' => 'required', 'site_name' => 'required',
]); ]);
\Illuminate\Console\Application::starting(function ($artisan) {
$artisan->resolveCommands([\Laravel\Passport\Console\KeysCommand::class]);
});
if ($request->has('generate_random')) { if ($request->has('generate_random')) {
Artisan::call('key:random'); Artisan::call('key:random');
Artisan::call('salt:random'); Artisan::call('salt:random');