2023-02-24 15:20:58 +00:00
|
|
|
<?php
|
|
|
|
|
|
2026-06-11 17:04:36 +02:00
|
|
|
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;
|
2026-06-11 17:04:36 +02:00
|
|
|
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');
|
|
|
|
|
|
2026-06-11 17:04:36 +02:00
|
|
|
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')
|
2024-06-20 17:13:58 +02:00
|
|
|
->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');
|
2024-06-20 17:13:58 +02:00
|
|
|
});
|
2023-03-09 10:27:19 +00:00
|
|
|
|
2023-08-28 08:46:47 +00:00
|
|
|
Route::prefix('/gammes')
|
2024-06-20 17:13:58 +02:00
|
|
|
->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')
|
2024-06-20 17:13:58 +02:00
|
|
|
->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')
|
2024-06-20 17:13:58 +02:00
|
|
|
->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');
|
2024-07-19 06:39:51 +00:00
|
|
|
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');
|
|
|
|
|
});
|