<?php

namespace App\Admin\Actions\backstage\User;

use App\Models\User;
use Encore\Admin\Actions\RowAction;
use Illuminate\Database\Eloquent\Model;

class BlackList extends RowAction
{
    public $name = '拉黑';

    public function handle(Model $model)
    {
        // $model ...
        User::where('id',$model->id)->update(['status'=>0]);
        return $this->response()->success('拉黑成功.')->refresh();
    }

}