58 lines
2.4 KiB
PHP
58 lines
2.4 KiB
PHP
<?php
|
|
|
|
use App\Http\Controllers\Fo\CommitmentController;
|
|
use App\Http\Controllers\Fo\ContactController;
|
|
use App\Http\Controllers\Fo\HomeController;
|
|
use App\Http\Controllers\Fo\ProductsController;
|
|
use App\Http\Controllers\Fo\RecipesController;
|
|
use App\Http\Controllers\Fo\ShopController;
|
|
use App\Http\Controllers\Fo\StaticPageController;
|
|
use Illuminate\Support\Facades\Route;
|
|
|
|
Route::namespace('\App\Http\Controllers\Fo')->middleware(['throttle:credentials'])->group(function () {
|
|
|
|
Route::get('/', [HomeController::class, 'index'])->name('home');
|
|
|
|
Route::get('/nos-engagements', [CommitmentController::class, 'index'])->name('engagments');
|
|
|
|
Route::view('/100-pour-100-local', 'fo.pages.local')->name('local');
|
|
|
|
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');
|
|
Route::get('/{publishedRecipe:slug}/print-recipe', [
|
|
RecipesController::class,
|
|
'printRecipe'
|
|
])->name('print-recipe');
|
|
});
|
|
|
|
Route::prefix('/gammes')
|
|
->name('ranges.')
|
|
->group(function () {
|
|
Route::get('/', [ProductsController::class, 'index'])->name('index');
|
|
Route::get('/{publishedRange:slug}/produits', [ProductsController::class, 'products'])->name('products');
|
|
});
|
|
|
|
Route::prefix('/produit')
|
|
->name('products.')
|
|
->group(function () {
|
|
Route::get('/{publishedProduct:slug}', [ProductsController::class, 'show'])->name('show');
|
|
});
|
|
|
|
Route::prefix('/contactez-nous')
|
|
->name('contact.')
|
|
->group(function () {
|
|
Route::get('/', [ContactController::class, 'index'])->name('show');
|
|
Route::post('/mail', [ContactController::class, 'contactSubmit'])->name('submit');
|
|
});
|
|
|
|
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');
|
|
|
|
// * 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');
|
|
});
|