ldc-lionor/routes/web-fo.php

59 lines
2.4 KiB
PHP
Raw Permalink Normal View History

2023-02-24 15:20:58 +00:00
<?php
use App\Http\Controllers\Fo\CommitmentController;
2023-03-09 10:27:19 +00:00
use App\Http\Controllers\Fo\ContactController;
2023-02-24 15:20:58 +00:00
use App\Http\Controllers\Fo\HomeController;
2023-03-09 10:27:19 +00:00
use App\Http\Controllers\Fo\ProductsController;
use App\Http\Controllers\Fo\RecipesController;
use App\Http\Controllers\Fo\ShopController;
use App\Http\Controllers\Fo\StaticPageController;
2023-02-24 15:20:58 +00:00
use Illuminate\Support\Facades\Route;
2023-08-28 08:46:47 +00:00
Route::namespace('\App\Http\Controllers\Fo')->middleware(['throttle:credentials'])->group(function () {
2023-03-09 10:27:19 +00:00
2023-08-28 08:46:47 +00:00
Route::get('/', [HomeController::class, 'index'])->name('home');
Route::get('/nos-engagements', [CommitmentController::class, 'index'])->name('engagments');
2023-08-28 08:46:47 +00:00
Route::view('/100-pour-100-local', 'fo.pages.local')->name('local');
2023-03-09 10:27:19 +00:00
2023-08-28 08:46:47 +00:00
Route::get('/recettes', [RecipesController::class, 'index'])->name('recipes.index');
Route::prefix('/recette')
->name('recipes.')
->group(function () {
Route::get('/{publishedRecipe:slug}', [RecipesController::class, 'show'])->name('show');
2024-09-06 07:59:44 +00:00
Route::get('/{publishedRecipe:slug}/print-recipe', [
RecipesController::class,
'printRecipe'
])->name('print-recipe');
});
2023-03-09 10:27:19 +00:00
2023-08-28 08:46:47 +00:00
Route::prefix('/gammes')
->name('ranges.')
->group(function () {
Route::get('/', [ProductsController::class, 'index'])->name('index');
Route::get('/{publishedRange:slug}/produits', [ProductsController::class, 'products'])->name('products');
});
2023-03-09 10:27:19 +00:00
2023-08-28 08:46:47 +00:00
Route::prefix('/produit')
->name('products.')
->group(function () {
Route::get('/{publishedProduct:slug}', [ProductsController::class, 'show'])->name('show');
});
2023-03-09 10:27:19 +00:00
2023-08-28 08:46:47 +00:00
Route::prefix('/contactez-nous')
->name('contact.')
->group(function () {
Route::get('/', [ContactController::class, 'index'])->name('show');
Route::post('/mail', [ContactController::class, 'contactSubmit'])->name('submit');
});
2023-03-09 10:27:19 +00:00
2023-08-28 08:46:47 +00:00
Route::view('/ou-nous-trouver', 'fo.pages.map')->name('map');
Route::get('/politique-de-donnees-personnelles', [StaticPageController::class, 'policies'])->name('policies');
Route::get('/mentions-legales', [StaticPageController::class, 'legals'])->name('legals');
2023-08-28 08:46:47 +00:00
// * ROUTES TO GET SHOPS FOR MARKET FINDER
Route::get('/api/shops', [ShopController::class, 'index'])->name('shops.index');
Route::get('/api/shops/search', [ShopController::class, 'getNearest'])->name('shops.nearest');
});