<?php

namespace App\Admin\Actions\backstage;
use App\Models\DocterOrganization;
use Encore\Admin\Actions\RowAction;
use Illuminate\Database\Eloquent\Model;

class Refuse extends RowAction
{
    public $name = '驳回';

    public function handle(Model $model)
    {
        // $model ...
        DocterOrganization::where('id',$model->id)->update(['state'=>2,'authentication_time'=>0,'authentication_end_time'=>0]);

        return $this->response()->success('审核驳回')->refresh();
    }

}