Updated the UpdateProductRequest and UpdateRecipeRequest to use built-in validation rules for file uploads, removing custom validation methods for pictures and PDFs. This change streamlines the validation process and improves code readability. refactor(helper): remove unused FileStorageHelper Deleted the FileStorageHelper class as it was no longer needed, simplifying the codebase. refactor(toolbox): clean up ToolboxHelper methods Removed unused methods and simplified existing ones in ToolboxHelper to enhance maintainability. feat(models): add translation search method to Product and Recipe Added a new method `whereTranslationLike` to both Product and Recipe models to facilitate searching translations. chore(config): add storage service prefix configuration Introduced a new configuration option for storage service prefix to allow customization of media paths. fix(validation): add file existence validation message Added a French translation for the file existence validation message to improve user feedback. feat(routes): add media route for file access Implemented a new route for accessing media files through a MediaController, enhancing file management capabilities.
51 lines
1.7 KiB
PHP
51 lines
1.7 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use App\Http\Controllers\Front\ProductController;
|
|
use App\Http\Controllers\Front\RecipeController;
|
|
use App\Http\Controllers\MediaController;
|
|
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');
|
|
});
|
|
|
|
Route::get('/media/{path}', MediaController::class)->where('path', '.*');
|
|
|
|
if (! app()->isProduction()) {
|
|
Route::get('/demo', function () {
|
|
return Inertia::render('front/Pages/Demo');
|
|
})->name('demo');
|
|
}
|