<?php

use Illuminate\Support\Facades\Route;
use App\Http\Controllers\dashboard\PartnersController;
use App\Http\Controllers\front\HomeController;

/*
|--------------------------------------------------------------------------
| 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!
|
*/

Route::get('language/{locale}', function($locale){
    app()->setLocale($locale);
    session()->put('locale',$locale);
    return redirect()->back();
})->name('localization');



Route::get('/', [HomeController::class, 'index_en'])->name('index_en');
Route::get('/ar', [HomeController::class, 'index_ar'])->name('index_ar');

Route::get('/services/{id}', [HomeController::class, 'en_services_index'])->name('en_services_index');
Route::get('/services_ar/{id}', [HomeController::class, 'ar_services_index'])->name('ar_services_index');

Route::post('/Send_message', [PartnersController::class, 'Send_message'])->name('Send_message');

Route::get('/newsletter/send', [HomeController::class, 'newsletter'])->name('newsletter');