<?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 Msg extends RowAction
{
    public $name = '回复';
    public function handle(Model $model, Request $request){
        $model->msg = $request->get('msg');
        $model->save();

        return $this->response()->success('回复成功!')->refresh();
    }

    public function form()
    {
        $this->textarea('msg','回复内容');
    }
}