ldc-legaulois/routes/web.php
2021-02-09 18:47:01 +01:00

240 lines
11 KiB
PHP

<?php
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Route;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
Auth::routes([
'reset' => false,
'verify' => false,
'register' => false
]);
Route::namespace('Bo')
->prefix('bo')
->name('bo.')
->middleware(['auth', 'is-admin'])
->group(function () {
// Tableau de bord
Route::get('/', 'DashboardController@index')->name('dashboard');
// Utilisateurs BO
Route::resource('users', 'UsersController');
// Type de viandes
Route::resource('meat-types', 'MeatTypesController');
// Moment consommation
Route::resource('consumption-times', 'ConsumptionTimesController');
// Pictogrammes
Route::resource('product-pictograms', 'ProductPictogramsController');
// Gammes
Route::resource('ranges', 'RangesController');
Route::get('/ranges/change-order/{id}/{action}', 'RangesController@changeOrder')->name('ranges.change-order');
// La marque
Route::resource('ads', 'AdsController');
// Sliders
Route::resource('home-slider-pictures', 'HomeSliderPicturesController');
Route::get('/home-slider-pictures/change-order/{id}/{action}', 'HomeSliderPicturesController@changeOrder')->name('home-slider-pictures.change-order');
Route::resource('news-slider-pictures', 'NewsSliderPicturesController');
Route::get('/news-slider-pictures/change-order/{id}/{action}', 'NewsSliderPicturesController@changeOrder')->name('news-slider-pictures.change-order');
Route::resource('product-slider-pictures', 'ProductSliderPicturesController');
Route::get('/product-slider-pictures/change-order/{id}/{action}', 'ProductSliderPicturesController@changeOrder')->name('product-slider-pictures.change-order');
Route::get('/recipes/highlights/choice', 'RecipesController@highlights')->name('recipes.highlights');
Route::put('/recipes/highlights/store', 'RecipesController@storeHighlights')->name('recipes.store-highlights');
// Recettes
Route::resource('recipes', 'RecipesController');
// Articles
Route::resource('articles', 'ArticlesController');
// QR codes
Route::resource('qr-codes', 'QrCodesController');
// FAQ
Route::resource('faq-themes', 'FaqThemesController');
Route::get('/faq-themes/change-order/{id}/{action}', 'FaqThemesController@changeOrder')->name('faq-themes.change-order');
Route::resource('faq-questions', 'FaqQuestionsController');
// Menus équilibrés
Route::resource('balanced-menus', 'BalancedMenusController');
// Oui c'est bon
Route::get('/ocb/content/{type}', 'ContentOCBController@index')->name('ocb.content');
Route::resource('ocb', 'ContentOCBController');
Route::get('/ocb/change-order/{id}/{type}/{action}', 'ContentOCBController@changeOrder')->name('ocb.change-order');
// Eleveurs
Route::get('/breeders/content/{type}', 'BreedersController@index')->name('breeders.content');
Route::resource('breeders', 'BreedersController');
// En ce moment
Route::resource('moments', 'MomentsController');
Route::get('/moments/change-star/{id}', 'MomentsController@setStar')->name('moments.change-star');
// Traçabilité
Route::put('/traceability/filters', 'TraceabilityController@filter')->name('traceability.filter');
Route::get('/traceability', 'TraceabilityController@index')->name('traceability.index');
// Réductions
Route::get('/reductions', 'ReductionsController@index')->name('reductions.index');
Route::post('/ajax/reductions/save', 'ReductionsController@saveDatas');
// Produits
Route::resource('products', 'ProductsController');
Route::get('/products/change-order/{id}/{action}', 'ProductsController@changeOrder')->name('products.change-order');
Route::get('/products/change-star/{id}', 'ProductsController@changeStar')->name('products.change-star');
// Forum
Route::get('/forum/themes', 'ForumController@index')->name('forum-themes');
Route::get('/forum/theme/{id?}', 'ForumController@manage')->name('manage-forum-themes');
Route::match(['post', 'put'], '/forum/theme/process/{id?}', 'ForumController@process')->name('process-forum-themes');
});
Route::get('/', 'HomeController@index')->name('home');
Route::get('/de-smaak-om-te-delen', function (){
die('home nl');
})->name('home-nl');
Route::post('/inscription', 'CustomerController@store')->name('inscription');
Route::post('/activer', 'CustomerController@activate')->name('activer');
Route::get('/connexion', 'CustomerController@authenticateForm')->name('form-connexion');
Route::post('/connexion', 'CustomerController@authenticate')->name('connexion');
Route::get('/deconnexion', 'CustomerController@logout')->name('deconnexion')->middleware('auth:customer');
Route::get('/reinitialiser-mdp', 'CustomerController@passwordReset')->name('reinit-mdp');
Route::post('/change-mdp/{token}', 'CustomerController@changePassword')->name('change-mdp');
Route::get('/contactez-nous', function (){
die('Nous contacter');
})->name('contact-us');
Route::get('/faq', function (){
die('FAQ');
})->name('faq');
Route::get('/reclamation-produit', function (){
die('reclamation-produit');
})->name('product-request');
Route::get('/mentions-legales', function (){
return view('front.legals');
})->name('legal-notice');
Route::prefix('/produits')
->name('products.')
->group(function() {
Route::get('/', 'ProductsController@index')->name('index');
Route::get('/gamme/{gammeSlug}', 'ProductsController@filter')->name('range');
Route::get('/type-viande/{slugTypeViande}', 'ProductsController@filter')->name('meat-type');
Route::get('/moment-conso/{slugMoment}', 'ProductsController@filter')->name('consumption-times');
Route::get('/departaimants', 'ProductsController@departaimants')->name('departaimants');
});
Route::prefix('/produit')
->name('product.')
->group(function() {
Route::get('/{slug}', 'ProductsController@show')->name('show');
Route::get('/ajouter-liste/{slug}', 'ProductsController@addToCart')->name('add-cart');
Route::get('/retirer-liste/{slug}', 'ProductsController@removeFromCart')->name('remove-cart');
});
Route::prefix('/cote-cuisine')
->name('kitchen-side.')
->group(function(){
Route::get('/', function (){
die('Côté cuisine');
})->name('index');
Route::prefix('/sante-et-nutrition')
->name('health-nutrition.')
->group(function() {
Route::get('/', function (){
return view('front.health-nutrition.health-nutrition');
})->name('health-nutrition');
Route::get('/engagement-nutrition', function() {
return view('front.health-nutrition.nutrition');
})->name('nutrition');
Route::get('/plaisir-et-equilibre', function() {
return view('front.health-nutrition.pleasure-balance');
})->name('pleasure-balance');
Route::get('/dechiffrez-valeurs-nutritionnelles', function() {
return view('front.health-nutrition.nutritional-values');
})->name('nutritional-values');
Route::get('/menu-equilibre', function() {
die("Mon menu équilibré");
})->name('balanced-menu');
});
});
Route::get('/recettes', 'RecipesController@index')->name('recipes.index');
Route::get('/proposer-une-recette', function () {
dd('proposer recette');
})->name('recipes.propose');
Route::get('/recettes-favorites', function () {
dd('proposer recette');
})->name('customer.favRecipes');
Route::prefix('/la-marque')
->name('brand.')
->group(function(){
Route::get('/', function (){
die('La Marque');
})->name('index');
Route::get('/notre-histoire', function (){
die('La Marque notre histoire');
})->name('history');
Route::get('/saga-publicitaire', function (){
die('La Marque saga-publicitaire');
})->name('pub');
Route::get('/volailles-francaises', function (){
die('La Marque volailles-francaises');
})->name('french-poultry');
Route::get('/nos-engagements-qualite', function (){
return view('front.quality');
})->name('our-quality-commitments');
Route::get('/tracabilite', function (){
return view('front.traceability');
})->name('traceability');
Route::get('/tracabilite/search', 'TraceabilityController@search')->name('traceability-search');
});
Route::prefix('/oui-cest-bon')
->name('ocb.')
->group(function(){
Route::get('/', function (){
return view('front.ocb.index');
})->name('index');
Route::get('/volaille', 'OCBController@poultry')->name('poultry');
Route::get('/oeuf', function() {
return view('front.ocb.egg');
})->name('egg');
// TODO : Voir si on garde ce format avec ID
Route::get('/eleveurs/{slug}', 'OCBController@breeder')->name('breeders');
Route::get('/temoignages-eleveurs', 'OCBController@testimonials')->name('testimonials');
});
Route::get('/en-ce-moment/{slug}', 'MomentsController@index')->name('moment');
Route::prefix('/le-club-des-gaulois')
->name('club.')
->group(function(){
Route::get('/', function (){
die('le-club-des-gaulois');
})->name('index');
Route::get('/les-infos-du-club', function (){
die('Les infos du club');
})->name('infos');
Route::get('/les-infos-du-club/{slug}', function (){
die('Les infos du club enfant');
})->name('infos.child');
Route::get('/les-departaimants', function() {
die('Les départaimants');
})->name('departaimants');
Route::get('/les-infos-du-club/categorie/astuces', function () {
die('Les astuces le gaulois');
})->name('tips');
Route::get('/les-promos', function() {
die('Les promos');
})->name('reductions');
});
Auth::routes();
Route::get('/home', 'HomeController@index')->name('home');