<?php

namespace App\Admin\Actions\Post;

use Encore\Admin\Actions\RowAction;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Http\Request;
use App\Admin\Models\Feedback;

/**
 * 修改状态
 * 已读、未读
 */
class StatusEdit extends RowAction
{
    public $name = '修改状态';
    public function handle(Model $model){
        $model->status = (int)!$model->status;
        $model->save();

        return $this->response()->success('Success!')->refresh();
    }

}