218 lines
11 KiB
PHP
218 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::get('/reductions/update', 'ReductionsController@updateBR')->name('reductions.update-br');
|
|
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', 'OnePageController@index')->name('home-nl');
|
|
|
|
Route::get('/inscription', 'CustomerController@registerForm')->name('form-inscription');
|
|
Route::post('/inscription', 'CustomerController@register')->name('inscription');
|
|
Route::get('/activer/{hashcode}', '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', 'ContactController@contact')->name('contact-us');
|
|
Route::post('/contactez-nous', 'ContactController@contactSubmit')->name('contact-us.submit');
|
|
Route::get('/reclamation-produit', 'ContactController@complain')->name('product-request');
|
|
Route::post('/reclamation-produit', 'ContactController@complainSubmit')->name('product-request.submit');
|
|
|
|
Route::get('/faq', 'FaqController@index')->name('faq');
|
|
Route::post('/faq/{question?}', 'FaqController@updateSatisfactionStat')->name('faq.updateSatisfactionStat');
|
|
|
|
Route::view('/mentions-legales', '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('/from-menus', 'ProductsController@indexMenusAjax')->name('from-menus');
|
|
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('/', 'RecipesController@kitchenside')->name('index');
|
|
Route::prefix('/sante-et-nutrition')->name('health-nutrition.')->group(function () {
|
|
Route::view('/', 'front.health-nutrition.health-nutrition')->name('health-nutrition');
|
|
Route::view('/engagement-nutrition', 'front.health-nutrition.nutrition')->name('nutrition');
|
|
Route::view('/plaisir-et-equilibre', 'front.health-nutrition.pleasure-balance')->name('pleasure-balance');
|
|
Route::view('/dechiffrez-valeurs-nutritionnelles', 'front.health-nutrition.nutritional-values')
|
|
->name('nutritional-values');
|
|
Route::view('/menu-equilibre', 'front.health-nutrition.balanced-menu')->name('balanced-menu');
|
|
Route::get('/menu-equilibre/{type}/{product}/menu', 'RecipesController@showForBalancedMenu')
|
|
->name('balanced-menu.menu');
|
|
});
|
|
});
|
|
|
|
Route::get('/recettes', 'RecipesController@index')->name('recipes.index');
|
|
Route::get('/recettes/{recipe:slug}', 'RecipesController@show')->name('recipes.show');
|
|
Route::post('/recettes/rate/{recipe:slug}', 'RecipesController@rate')->name('recipes.rate');
|
|
Route::get('/proposer-une-recette', function () {
|
|
//TODO: do this
|
|
die('proposer recette');
|
|
})->name('recipes.propose');
|
|
|
|
|
|
Route::prefix('/la-marque')
|
|
->name('brand.')
|
|
->group(function () {
|
|
Route::get('/', 'BrandController@index')->name('index');
|
|
Route::view('/notre-histoire', 'front.brand.history')->name('history');
|
|
Route::get('/saga-publicitaire', 'BrandController@ads')->name('pub');
|
|
Route::view('/volailles-francaises', 'front.brand.poultry')->name('french-poultry');
|
|
Route::view('/nos-engagements-qualite', 'front.brand.quality')->name('our-quality-commitments');
|
|
Route::view('/tracabilite', 'front.brand.traceability')->name('traceability');
|
|
Route::get('/tracabilite/search', 'TraceabilityController@search')->name('traceability-search');
|
|
});
|
|
|
|
Route::prefix('/oui-cest-bon')
|
|
->name('ocb.')
|
|
->group(function () {
|
|
Route::view('/', 'front.ocb.index')->name('index');
|
|
Route::get('/volaille', 'OCBController@poultry')->name('poultry');
|
|
Route::view('/oeuf', '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('/', 'ClubController@index')->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');
|
|
});
|
|
|
|
Route::prefix('/mon-compte')
|
|
->name('account.')
|
|
->middleware('auth')
|
|
->group(function() {
|
|
Route::get('/mes-informations', 'ClubController@infos')->name('infos');
|
|
Route::post('/mes-informations', 'ClubController@updateInfos')->name('update-infos');
|
|
Route::get('/notifications', function() {
|
|
die('Mes notifications');
|
|
})->name('notifications');
|
|
Route::get('/messages', function() {
|
|
die('Mes messages');
|
|
})->name('messages');
|
|
Route::get('/recettes-favorites', function() {
|
|
die('Mes recettes favorites');
|
|
})->name('favs-recipes');
|
|
Route::get('/liste-de-courses', function() {
|
|
die('Ma liste de courses');
|
|
})->name('cart');
|
|
});
|