<?php

namespace App\Admin\Actions\backstage\Evaluate;

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

class Pass extends RowAction
{
    public $name = '审核通过';

    public function handle(Model $model)
    {
        // $model ...
        Evaluate::where('id',$model->id)->update(['status'=>2,'audit_time'=>time()]);
        return $this->response()->success('审核通过.')->refresh();
    }

}