新增定时任务功能;

This commit is contained in:
augushong
2022-02-28 21:31:07 +08:00
parent f4b7371dbd
commit 0f0a1a72af
9 changed files with 177 additions and 6 deletions

View File

@@ -18,6 +18,7 @@ class ResetPassword extends Command
{
// 指令配置
$this->setName('admin:resetPassword')
->addOption('password','p', Option::VALUE_OPTIONAL)
->setDescription('重置超管密码');
}
@@ -33,7 +34,12 @@ class ResetPassword extends Command
return false;
}
$password = uniqid();
$password = $input->getOption('password');
if(is_null($password)){
$password = uniqid();
}
$model_admin->save([
'password' => password($password)