<?php

namespace App\Http\Controllers;

use App\Http\Requests\SuggestionRequest;
use App\Models\Suggestion;
use App\Traits\BaseApiResponse;

class SuggestionController extends Controller
{
    use BaseApiResponse;

    public function index(SuggestionRequest $requst) 
    {
        Suggestion::create([
            'user_id' => auth()->user()->id,
            'text' => $requst->text
        ]);

        return $this->success(null,'موفقیت','پیشنهاد شما با موفقیت برای مدیر ارسال شد');
    }
}
