187 lines
9.1 KiB
PHP
187 lines
9.1 KiB
PHP
<?php
|
|
|
|
use App\Http\Controllers\Fo\BreedingController;
|
|
use App\Http\Controllers\Fo\BreederController;
|
|
use App\Http\Controllers\Fo\ContactController;
|
|
use App\Http\Controllers\Fo\ExportController;
|
|
use App\Http\Controllers\Fo\HomeController;
|
|
use App\Http\Controllers\Fo\NewsController;
|
|
use App\Http\Controllers\Fo\ProductController;
|
|
use App\Http\Controllers\Fo\RatingController;
|
|
use App\Http\Controllers\Fo\RecipeController;
|
|
use App\Http\Controllers\Fo\SearchController;
|
|
use App\Http\Controllers\Fo\StaticPageController;
|
|
use Illuminate\Support\Facades\Route;
|
|
|
|
Route::middleware(['throttle:web'])->name('fo.')->group(function () {
|
|
// * Dev route only
|
|
if (app()->environment('local', 'staging')) {
|
|
Route::view('/bs-demo', 'fo.pages.bs-demo')->name('bs-demo');
|
|
Route::view('/partials-demo', 'fo.pages.partials-demo')->name('partials-demo');
|
|
}
|
|
|
|
// * STATIC PAGES
|
|
Route::get('/', [HomeController::class, 'index'])->name('home.show');
|
|
Route::post('/accueil/produits-par-gamme/{legend_slug}', [
|
|
ProductController::class,
|
|
'jsonGetProductsViewsByRange'
|
|
])->name('home.products');
|
|
Route::post('/accueil/actualites_chaudes', [HomeController::class, 'updateHotNewsSatus'])
|
|
->name('home.hotnews');
|
|
Route::get('/recrutement', [StaticPageController::class, 'recruitment'])->name('recruitment.show');
|
|
Route::get('/mentions-legales-cgu', [StaticPageController::class, 'legals'])->name('legals.show');
|
|
Route::get('/charte-de-confidentialite', [StaticPageController::class, 'policies'])->name('policies.show');
|
|
Route::get('/conditions-generales-de-vente', [StaticPageController::class, 'selling'])->name('conditions.show');
|
|
Route::get('/accessibilite', [StaticPageController::class, 'accessibility'])->name('accessibility.show');
|
|
Route::get('/plan-du-site', [StaticPageController::class, 'sitemap'])->name('sitemap.show');
|
|
Route::get('/reglement-du-jeu', [StaticPageController::class, 'rules'])->name('rules.show');
|
|
|
|
// * SEARCH
|
|
Route::get('/recherche', [SearchController::class, 'search'])->name('search.index');
|
|
Route::post('/recherche', [SearchController::class, 'searchString'])->name('search.string');
|
|
|
|
// * CONTACT
|
|
Route::get('/contact', [ContactController::class, 'contact'])->name('contact.show');
|
|
Route::post('/contactSubmit', [ContactController::class, 'contactSubmit'])->name('contact.submit');
|
|
|
|
// * BRAND
|
|
Route::prefix('marque')
|
|
->name('brand.')
|
|
->group(function () {
|
|
Route::get('/qui-sommes-nous', [StaticPageController::class, 'story'])->name('story');
|
|
Route::get('/saga-publicitaire', [StaticPageController::class, 'saga'])->name('saga');
|
|
});
|
|
|
|
// * NEWS
|
|
Route::name('news.')
|
|
->group(function () {
|
|
Route::get('/actus', [NewsController::class, 'index'])->name('index');
|
|
Route::get('/actus/{slug}', [NewsController::class, 'show'])->name('show');
|
|
Route::post('/actus/actus-par-categorie/{legend_slug}', [
|
|
NewsController::class,
|
|
'jsonGetNewsViewsByCategory'
|
|
])->name('filtered');
|
|
});
|
|
|
|
// * PRODUCTS
|
|
Route::prefix('produits')
|
|
->name('products.')
|
|
->group(function () {
|
|
Route::get('/', [ProductController::class, 'index'])->name('index');
|
|
Route::get('/{slug}', [ProductController::class, 'show'])->name('show');
|
|
Route::name('search.')
|
|
->group(function () {
|
|
Route::get('/recherche/mots', [ProductController::class, 'getProductsByWords'])
|
|
->name('text');
|
|
Route::get('/recherche/mots/liste', [ProductController::class, 'getWordsList'])
|
|
->name('text-list');
|
|
Route::get('/gammes/{model_slug}', [ProductController::class, 'getProductsByRange'])
|
|
->name('range');
|
|
Route::get('/gammes/{model_slug}/{child_slug}', [
|
|
ProductController::class,
|
|
'getProductsBySubrange'
|
|
])->name('subrange');
|
|
Route::get('/viandes/{model_slug}', [ProductController::class, 'getProductsByMeat'])
|
|
->name('meat');
|
|
Route::get('/viandes/{model_slug}/{child_slug}', [
|
|
ProductController::class,
|
|
'getProductsBySubmeat'
|
|
])->name('submeat');
|
|
});
|
|
});
|
|
|
|
// * RECIPES
|
|
Route::prefix('recettes')
|
|
->name('recipes.')
|
|
->group(function () {
|
|
Route::get('/', [RecipeController::class, 'index'])->name('index');
|
|
Route::get('/{slug}', [RecipeController::class, 'show'])->name('show');
|
|
Route::get('/{slug}/print-commercial-sheet', [
|
|
RecipeController::class,
|
|
'printCommericalSheet'
|
|
])->name('print-commercial-sheet');
|
|
Route::name('search.')
|
|
->group(function () {
|
|
Route::get('/recherche/mots', [RecipeController::class, 'getRecipesByWords'])
|
|
->name('text');
|
|
Route::get('/recherche/mots/liste', [RecipeController::class, 'getWordsList'])
|
|
->name('text-list');
|
|
Route::get('/moments/{model_slug}', [RecipeController::class, 'getRecipesByConsumptionMoment'])
|
|
->name('consumption-moment');
|
|
Route::get('/viandes/{model_slug}', [RecipeController::class, 'getRecipesByMeat'])
|
|
->name('meat');
|
|
Route::get('/viandes/{model_slug}/{child_slug}', [
|
|
RecipeController::class,
|
|
'getRecipesBySubmeat'
|
|
])->name('submeat');
|
|
});
|
|
});
|
|
|
|
// * COMMITMENTS
|
|
Route::prefix('engagements')
|
|
->name('commitments.')
|
|
->group(function () {
|
|
// FIXME: En attente d'une évolution. Le blade est actuellement vide. A décommenter quand ça sera décidé.
|
|
// Route::view('/', 'fo.pages.commitments.index')->name('index');
|
|
Route::view('/la-marque-100-francaise', 'fo.pages.commitments.brand')->name('brand');
|
|
Route::view('/elever-durablement', 'fo.pages.commitments.raise')->name('raise');
|
|
Route::view('/bien-nourrir-les-francais', 'fo.pages.commitments.eat')->name('eat');
|
|
Route::view('/favoriser-le-mieux-vivre-ensemble', 'fo.pages.commitments.life')->name('life');
|
|
Route::view('/respecter-la-terre', 'fo.pages.commitments.respect')->name('respect');
|
|
});
|
|
|
|
// * BREEDING
|
|
Route::prefix('les-elevages')
|
|
->name('breeding.')
|
|
->group(function () {
|
|
Route::view('/', 'fo.pages.breeding.index')->name('index');
|
|
Route::get('/oui-c-est-bon', [BreedingController::class, 'ocbBreederPage'])->name('oui-c-est-bon');
|
|
Route::view('/sortant-a-l-exterieur', 'fo.pages.breeding.sortant-a-l-exterieur')
|
|
->name('sortant-a-l-exterieur');
|
|
Route::get('/{breeding_static_page:slug}', [BreedingController::class, 'breedingPage'])
|
|
->name('show');
|
|
Route::get('/{breeding_static_page:slug}/{published_news_breeding:slug}', [
|
|
BreedingController::class,
|
|
'breedingArticle'
|
|
])->name('article.show');
|
|
});
|
|
|
|
// * 40 years birthday
|
|
Route::view('/40-ans', 'fo.pages.page-des-40-ans')->name('40-ans');
|
|
Route::get('/nl', [ExportController::class, 'nl'])->name('nl.export');
|
|
|
|
// * NEWSLETTER
|
|
Route::post('/optin', [HomeController::class, 'addOptIn'])->name('add-single-optin');
|
|
// * Unsubscribe from newsletter
|
|
Route::get('/{unsubscribe}', [HomeController::class, 'unsubscribeNewsletter'])
|
|
->where('unsubscribe', 'unsubscribe|unsubscribe.php|unsubscribe.html|newsletter')
|
|
->name('unsubscribeNewsletter');
|
|
|
|
// * BREEDERS
|
|
Route::prefix('breeders')
|
|
->name('breeders.')
|
|
->group(function () {
|
|
Route::get('/get-count-per-department', [BreederController::class, 'getBreederCountPerDepartment'])
|
|
->name('get-count-per-department');
|
|
Route::post('/get-department-breeders/{department}', [BreederController::class, 'getDepartmentBreeders'])
|
|
->name('get-department-breeders');
|
|
Route::post('/get-department-breeders-views/{department}', [
|
|
BreederController::class,
|
|
'getDepartmentBreedersViews'
|
|
])
|
|
->name('get-department-breeders-views');
|
|
Route::get('/get-manageable-text-component', [BreederController::class, 'getManageableTextComponent'])
|
|
->name('get-manageable-text-component');
|
|
|
|
// * OCB BREEDERS.
|
|
Route::post('/recherche-ocb-eleveurs', [BreederController::class, 'searchOcbBreedersCards'])
|
|
->name('search-ocb');
|
|
});
|
|
|
|
// * RATINGS
|
|
Route::post('/send-rating', [RatingController::class, 'store'])
|
|
->name('ratings.store');
|
|
|
|
// * OTHERS
|
|
Route::view('/tour-de-france', 'fo.pages.tdf')->name('tdf');
|
|
});
|