<?php

use Illuminate\Support\Facades\Route;
use App\Http\Controllers\garageGateFormController;
use App\Http\Controllers\pergolaFormController;
use App\Http\Controllers\gardenGateFormController;

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider and all of them will
| be assigned to the "web" middleware group. Make something great!
|
*/


// Guest
Route::prefix('/email')->name('email.')->group(function () {
    Route::post('/send', [App\Http\Controllers\MailController::class, 'send'])->name('send');
});

// Route::get('/send-email', [App\Http\Controllers\MailController::class, 'send'])->name('send');

// Route::post('/send-email', [MailController::class, 'send_email'])->name('send_email');

Route::get('/', function () {
    return view('home');
});

Route::get('/garazskapu', function () {
    return view('garazskapu');
});

Route::post('/garazskapu', [garageGateFormController::class, 'submitForm'])->name('garazskapu.submit');

Route::get('/pergola', function () {
    return view('pergola');
});

Route::post('/pergola', [pergolaFormController::class, 'submitForm'])->name('pergola.submit');

Route::get('/kertkapu', function () {
    return view('kertkapu');
});

Route::post('/kertkapu', [gardenGateFormController::class, 'submitForm'])->name('kertkapu.submit');

Route::get('/kertibutor', function () {
    return view('kertibutor');
});

Route::get('/kapcsolat', function () {
    return view('kapcsolat');
});



