<?php

namespace App\Http\Controllers;

use App\Http\Requests\StoreContactMessageRequest;
use App\Models\ContactMessage;

class ContactPageController extends Controller
{
    public function form()
    {   return view('frontend.contact.index'); }

    public function submit(StoreContactMessageRequest $request)
    {
        ContactMessage::create($request->validated());
        return back()->with('success', 'ধন্যবাদ! আপনার বার্তাটি পাওয়া গেছে।');
    }
}