<?php
/**
 * Created by PhpStorm.
 * User: zilongs
 * Date: 20-11-4
 * Time: 下午4:29
 */

namespace App\Http\Controllers\Api\V1;

use App\Models\Feedback;

class FeedbackController extends AuthController
{
    public function sumitFeedback()
    {
        $req = request()->post();
        $this->validate(request(), [
            'content|反馈内容' => 'required|max:500'
        ]);
        $user = $this->user;

        Feedback::create([
            'user_id' => $user['id'],
            'content' => $req['content'],
        ]);

        return out();
    }
}
