66 lines
3 KiB
PHP
66 lines
3 KiB
PHP
<?php
|
|
|
|
use App\Http\Controllers\Fo\CustomerController;
|
|
use App\Http\Controllers\Fo\ParticipateController;
|
|
use App\Http\Controllers\Fo\HomeController;
|
|
use App\Http\Controllers\Fo\StaticPageController;
|
|
use App\Http\Controllers\Fo\WinningProofController;
|
|
use Illuminate\Support\Facades\Auth;
|
|
use Illuminate\Support\Facades\Route;
|
|
|
|
Route::middleware(['throttle:credentials'])->name('fo.')->group(function () {
|
|
|
|
// * Dev route only
|
|
if (app()->environment() === 'local') {
|
|
Route::view('/bs-demo', 'back::pages.bs-demo')->name('bs-demo');
|
|
}
|
|
|
|
// * Pages début et fin de jeu
|
|
Route::get('teaser', [HomeController::class, 'teaser'])->name('teaser');
|
|
Route::get('fin-du-jeu', [HomeController::class, 'endGame'])->name('end');
|
|
|
|
// * Routes nécessitant que le jeu soit activé.
|
|
Route::middleware('check-game-status')->group(function () {
|
|
// * FRONTEND AUTH
|
|
Route::namespace('\App\Http\Controllers\Fo')->group(function () {
|
|
Auth::routes([
|
|
'confirm' => true,
|
|
'login' => true,
|
|
'logout' => true,
|
|
'register' => true,
|
|
'reset' => true,
|
|
'verify' => true,
|
|
]);
|
|
});
|
|
|
|
// * Routes nécessitant d'être connecté.
|
|
Route::middleware(['auth:frontend', 'verified:fo.verification.notice'])->group(function () {
|
|
// * Participation routes
|
|
Route::get('saisir-code', [ParticipateController::class, 'participate'])->name('participate');
|
|
Route::post('saisir-code', [ParticipateController::class, 'participateSubmit'])->name('participate-submit');
|
|
|
|
// * Winning Proof routes
|
|
Route::get('preuve-de-gains/{participation}', [WinningProofController::class, 'displayForm'])
|
|
->name('winning-proof');
|
|
Route::post('preuve-de-gains/{participation}', [WinningProofController::class, 'displayFormSubmit'])
|
|
->name('winning-proof-submit');
|
|
|
|
// * View all winning participations
|
|
Route::get('mes-gains', [CustomerController::class, 'viewWinningParticipations'])
|
|
->name('view-winning-participations');
|
|
|
|
// * Fill Missing Customer Info in order to use MesBr
|
|
Route::get('profil/verify', [CustomerController::class, 'profilVerify'])->name('profil.verify');
|
|
Route::put('profil/verify', [CustomerController::class, 'profilVerifySubmit'])
|
|
->name('profil.verify-submit');
|
|
});
|
|
|
|
|
|
Route::get('/', [HomeController::class, 'home'])->name('homepage');
|
|
Route::get('produits-porteurs', [HomeController::class, 'showProducts'])->name('produits-porteurs');
|
|
Route::get('faq', [HomeController::class, 'showFaq'])->name('faq');
|
|
Route::get('reglement', [StaticPageController::class, 'reglement'])->name('reglement');
|
|
Route::get('charte', [StaticPageController::class, 'charte'])->name('charte');
|
|
Route::get('mentions-legales', [StaticPageController::class, 'legals'])->name('legals');
|
|
});
|
|
});
|