<?php

namespace App\Http\Controllers\Api\V1;

use App\Http\Controllers\Controller;
use App\Http\Requests\Api\V1\Forms\ContactUS\ContactUSStoreRequest;
use App\Models\CMS\Forms\ContactUS;
use Illuminate\Http\JsonResponse;

class ContactMessageController extends Controller
{
    /**
     * (Marketing)* Contact us
     */
    public function store(ContactUSStoreRequest $request): JsonResponse
    {
        ContactUS::create([
            'phone' => $request->phone,
            'title' => $request->title,
            'content' => $request->content,
            'type' => $request->type,
            'user_id' => auth()->id(),
        ]);

        return response()->rest([], 201);
    }
}
