链街Dcat后台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

40 lines
877 B

<?php
namespace App\Admin\Actions\Grid\v3;
use Dcat\Admin\Grid\RowAction;
use Illuminate\Support\Facades\Redis;
use App\Libs\Redis\RedisKey;
use Illuminate\Http\Request;
class ShareCardDelete extends RowAction
{
/**
* @return string
*/
protected $title = ' 删除 ';
public function handle(Request $request)
{
$id = $request->get('id');
$res = Redis::hdel(RedisKey::PROGRAM_SHARE_CARD ,$id);
if($res !== false){
return $this->response()->success('删除成功!','/share_card_setting');
}else{
return $this->response()->error('删除失败!');
}
}
// 确认弹窗信息
public function confirm()
{
return '您确定要删除吗?';
}
public function parameters()
{
return [
'id' => $this->row->id ?? 0
];
}
}