<?php

use App\Http\Controllers\Web\AddressController;
use App\Http\Controllers\Web\AuthController;
use App\Http\Controllers\Web\CartController;
use App\Http\Controllers\Web\NewsletterController;
use App\Http\Controllers\Web\OrderController;
use App\Http\Controllers\Web\ProductController;
use App\Http\Controllers\Web\ProfileController;
use App\Http\Controllers\Web\VisitorMessageController;
use App\Http\Controllers\Web\HomeController;
use App\Http\Controllers\Web\PageController;
use Illuminate\Support\Facades\Route;
use Mcamara\LaravelLocalization\Facades\LaravelLocalization;
use Modules\Payment\Controllers\PaymentController;

/*
  |--------------------------------------------------------------------------
  | 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('language/{id}/{slug?}', 'LanguageController@details');

Route::group(['prefix' => LaravelLocalization::setLocale()], function () {

    Route::get('/',function(){
        return view('web.pages.home.index');
    });
        // Route::get('/pay', [PaymentController::class, 'pay']);
    Route::get('/payment/success', [PaymentController::class, 'success']);
    Route::get('/payment/cancel', [PaymentController::class, 'cancel']);
    Route::get('/payment/check', [PaymentController::class, 'check']);
    
    Route::get('/policy',function(){
        return view('web.pages.pages.page');
    });
    Route::get('/terms',function(){
        return view('web.pages.pages.page_2');
    });
    
});
