Files
pingan_unionpay_new/app/Admin/Actions/User/RefD3Key.php
2021-01-31 11:50:56 +08:00

25 lines
505 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
namespace App\Admin\Actions\User;
use Encore\Admin\Actions\RowAction;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Str;
class RefD3Key extends RowAction
{
public $name = '刷新D3key';
public function handle(Model $model)
{
$model->des3key = Str::random(24);
$model->save();
return $this->response()->success('操作成功')->refresh();
}
public function dialog()
{
$this->confirm('确定要刷新D3key吗');
}
}