[admin] add setting backup

This commit is contained in:
xiaomlove
2021-05-14 20:41:43 +08:00
parent 6c85176e2f
commit 47f64f2c5c
23 changed files with 787 additions and 39 deletions

View File

@@ -57,9 +57,9 @@ class Test extends Command
// dd($r);
// $rep->assignCronjob();
// $r = $rep->cronjobCheckout();
$disk = Storage::disk('google_dirve');
$r = $disk->put('/', base_path('composer.json'));
dd($r);
// $disk = Storage::disk('google_dirve');
// $r = $disk->put('/', base_path('composer.json'));
// $r = DB::table('users')->where('id', 1)->update(['modcomment' => DB::raw("concat_ws(',', 'ddddd', modcomment)")]);
}
}

View File

@@ -12,14 +12,14 @@ class UserResetPassword extends Command
*
* @var string
*/
protected $signature = 'user:reset_password {username} {password} {password_confirmation}';
protected $signature = 'user:reset_password {uid} {password} {password_confirmation}';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Reset user password, arguments: username password password_comfirmation';
protected $description = 'Reset user password, arguments: uid password password_comfirmation';
/**
* Create a new command instance.
@@ -38,15 +38,15 @@ class UserResetPassword extends Command
*/
public function handle()
{
$username = $this->argument('username');
$uid = $this->argument('uid');
$password = $this->argument('password');
$passwordConfirmation = $this->argument('password_confirmation');
$log = "username: $username, password: $password, passwordConfirmation: $passwordConfirmation";
$log = "uid: $uid, password: $password, passwordConfirmation: $passwordConfirmation";
$this->info($log);
do_log($log);
$rep = new UserRepository();
$result = $rep->resetPassword($username, $password, $passwordConfirmation);
$result = $rep->resetPassword($uid, $password, $passwordConfirmation);
$log = sprintf('[%s], %s, result: %s', REQUEST_ID, __METHOD__, var_export($result, true));
$this->info($log);
do_log($log);