ldc-lionor/routes/web-fo.php

51 lines
1.9 KiB
PHP

<?php
use App\Http\Controllers\Fo\ShopController;
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 Illuminate\Support\Facades\Route;
Route::get('/', [HomeController::class, 'index'])->name('home');
Route::prefix('/nos-engagements')
->group(function () {
Route::view('/', 'fo.pages.engagments')->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::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::view('/politique-de-donnees-personnelles', 'fo.pages.policies')->name('policies');
Route::view('/mentions-legales', 'fo.pages.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');