<?php

use Illuminate\Support\Facades\Route;
use App\Http\Controllers\IndexController;
use App\Http\Controllers\AboutController;
use App\Http\Controllers\ContactController;
use App\Http\Controllers\EservicesController;
use App\Http\Controllers\UserController;
use App\Http\Controllers\ModuleGSController;

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

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

Route::group(['middleware' => ['load_tenant']], function () {
    Route::get('/', [IndexController::class, 'index'])->name('accueil');
    Route::get('auth',[IndexController::class, 'auth'])->name('auth');
});


Route::match(['get','post'],'contact', [ContactController::class, 'create'])->name('contact');

Route::get('about', [AboutController::class, 'create']);

Route::get('eservices', [EservicesController::class, 'create']);

Route::get('login', [UserController::class, 'create']);

Route::get('logout', [UserController::class, 'logout']);

Route::post('verifylogin', [UserController::class, 'login_v']);

// Module GS

Route::get('/module-gs', [ModuleGSController::class, 'index']);
