84 lines
3.7 KiB
PHP
84 lines
3.7 KiB
PHP
<?php
|
|
|
|
use App\Http\Controllers\Fo\NewsController;
|
|
use App\Http\Controllers\Fo\ContactController;
|
|
use App\Http\Controllers\Fo\HomeController;
|
|
use App\Http\Controllers\Fo\Klub\CustomerController;
|
|
use App\Http\Controllers\Fo\Klub\KlubController;
|
|
use App\Http\Controllers\Fo\Klub\MesBrController;
|
|
use App\Http\Controllers\Fo\StaticPageController;
|
|
use App\Http\Controllers\Fo\CommitmentController;
|
|
use App\Http\Controllers\Fo\ProductController;
|
|
use App\Http\Controllers\Fo\RangeController;
|
|
use Illuminate\Support\Facades\Auth;
|
|
use Illuminate\Support\Facades\Route;
|
|
|
|
Route::middleware(['throttle:credentials'])->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/{publishedNews:slug}', [NewsController::class, 'show'])->name('news.show');
|
|
|
|
// * RANGES
|
|
Route::get('/gammes', [RangeController::class, 'index'])->name('ranges.index');
|
|
Route::get('/gamme/{frontRange:slug}', [RangeController::class, 'show'])->name('ranges.show');
|
|
|
|
// * PRODUCTS
|
|
Route::get('/produit/filtered', [ProductController::class, 'productsFiltered'])->name('products.filtered');
|
|
Route::get('/produit/{publishedProduct: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');
|
|
|
|
// * 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');
|
|
});
|