Add new DTOs for handling product and category data structures. These DTOs facilitate data transfer and serialization for products and categories. refactor(controller): update ProductController to use executor pattern Refactor ProductController to utilize an executor for handling product creation, updating, and deletion, improving code organization and maintainability. refactor(controller): update RecipeController to use executor pattern Refactor RecipeController to utilize an executor for handling recipe creation, improving code organization and maintainability. chore: remove MediaController Remove MediaController as it is no longer needed in the application. feat(request): enhance StoreProductRequest and UpdateProductRequest Enhance StoreProductRequest and UpdateProductRequest to include methods for transforming request data into input objects for actions. chore: add ActionExecutorService for executing actions and queries Introduce ActionExecutorService to handle the execution of actions and queries with logging and transaction management. chore(deps): update composer dependencies Update composer dependencies to include webmozart/assert for improved type assertions.
48 lines
1.5 KiB
PHP
48 lines
1.5 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use App\Http\Controllers\Front\ProductController;
|
|
use App\Http\Controllers\Front\RecipeController;
|
|
use Illuminate\Support\Facades\Route;
|
|
use Inertia\Inertia;
|
|
|
|
Route::get('/nos-engagements', function () {
|
|
return Inertia::render('front/Pages/Commitment');
|
|
})->name('engage');
|
|
|
|
Route::get('/nos-engagements/fabrique-en-france', function () {
|
|
return Inertia::render('front/Pages/MadeInFrance');
|
|
})->name('made-in-france');
|
|
|
|
Route::get('/nos-engagements/exhausteur-de-papilles', function () {
|
|
return Inertia::render('front/Pages/Expertise');
|
|
})->name('expertise');
|
|
|
|
Route::get('/nos-engagements/large-gamme-100-alternative', function () {
|
|
return Inertia::render('front/Pages/Gamme');
|
|
})->name('gamme');
|
|
|
|
Route::get('/nous-contacter', function () {
|
|
return Inertia::render('front/Pages/Contact/ContactUs');
|
|
})->name('contact-us');
|
|
|
|
Route::get('/rechercher', function () {
|
|
return Inertia::render('front/Pages/Search');
|
|
})->name('search');
|
|
|
|
Route::name('products.')->prefix('produits')->group(function () {
|
|
Route::get('/', [ProductController::class, 'index'])->name('index');
|
|
Route::get('/{product}', [ProductController::class, 'show'])->name('show');
|
|
});
|
|
|
|
Route::name('recipes.')->prefix('recettes')->group(function () {
|
|
Route::get('/', [RecipeController::class, 'index'])->name('index');
|
|
Route::get('/{recipe}', [RecipeController::class, 'show'])->name('show');
|
|
});
|
|
|
|
if (! app()->isProduction()) {
|
|
Route::get('/demo', function () {
|
|
return Inertia::render('front/Pages/Demo');
|
|
})->name('demo');
|
|
}
|