name('fo.')->group(function () { Route::get('/', [HomeController::class, 'index'])->name('homepage'); // * FRONTEND AUTH Route::namespace('\App\Http\Controllers\Fo')->group(function () { Auth::routes([ 'confirm' => true, 'login' => true, 'logout' => true, 'register' => true, 'reset' => true, 'verify' => true, ]); }); Route::middleware(['auth:frontend', 'verified:fo.verification.notice']) ->name('klub.') ->prefix('klub') ->group(function () { // * QUESTIONS Route::get('questions', [KlubController::class, 'questions'])->name('questions'); Route::post('questions', [KlubController::class, 'questionsSubmit'])->name('questions-submit'); Route::middleware('crm_questions')->group(function () { // * HOME Route::get('home', [KlubController::class, 'home'])->name('home'); // * PROFILE Route::get('profile', [CustomerController::class, 'profile'])->name('profil'); Route::patch('profile', [CustomerController::class, 'profileUpdate'])->name('profil-update'); // * SECURITY Route::get('/securite/identification/motdepasse', [CustomerController::class, 'password']) ->name('password'); Route::post('/securite/identification/motdepasse', [ CustomerController::class, 'passwordSubmit' ])->name('passwordSubmit'); // * BR Route::get('reductions', [MesBrController::class, 'showCustomerBrList'])->name('reductions'); Route::post('reductions/print', [MesBrController::class, 'fetchBrPdf'])->name('reductions-print'); }); }); // * NEWS Route::get('/actualites', [NewsController::class, 'index'])->name('news.index'); Route::get('/actualites/{frontNews:slug}', [NewsController::class, 'show'])->name('news.show'); // * RANGES Route::get('/gammes', [RangeController::class, 'index'])->name('ranges.index'); Route::get('/gamme/{slug}', [RangeController::class, 'show'])->name('ranges.show'); // * PRODUCTS Route::middleware('json_only')->get( '/produit/filtered', [ProductController::class, 'productsFiltered'] )->name('products.filtered'); Route::get('/produit/{slug}', [ProductController::class, 'show'])->name('products.show'); // * COMMITMENTS Route::get('/nos-engagements', [CommitmentController::class, 'show'])->name('commitments.show'); // * LEGALS Route::get('/mentions-legales', [StaticPageController::class, 'legals'])->name('legals.show'); Route::get('/charte-de-confidentialite', [StaticPageController::class, 'policies'])->name('policies.show'); Route::get('/reglement-du-jeu', [StaticPageController::class, 'rules'])->name('rules.show'); // * CONTACT Route::get('contact', [ContactController::class, 'contact'])->name('contact'); Route::post('contact', [ContactController::class, 'contactSubmit'])->name('contact-submit'); // * HISTORY Route::get('/notre-histoire', [StaticPageController::class, 'ourHistory'])->name('history.show'); // * Unsubscribe from newsletter Route::get('/{unsubscribe}', [HomeController::class, 'unsubscribeNewsletter']) ->where('unsubscribe', 'unsubscribe|unsubscribe.php|unsubscribe.html|newsletter') ->name('unsubscribeNewsletter'); });