ldc-doux/routes/web.php
2021-12-06 16:27:44 +01:00

107 lines
3.8 KiB
PHP

<?php
/**
* Routes file
*
* @category Description
* @package Category
* @author Name <email@email.com>
* @license www.url.com MIT
* @link Tag
* phpcs:ignore PEAR.Commenting.FileComment.MissingVersion
*/
use App\Http\Controllers\Bo\HomeController;
use App\Http\Controllers\Bo\SlidersController;
use App\Http\Controllers\Bo\SlidesController;
use App\Http\Controllers\HomeController as ControllersHomeController;
use App\Http\Controllers\ContactController as ControllersContactController;
use Illuminate\Support\Facades\Route;
use Illuminate\Support\Facades\Auth;
/*
|--------------------------------------------------------------------------
| 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!
|
*/
Route::prefix('bo')
->name('bo.')
->group(
function () {
//Route::middleware(['throttle:credentials'])
Route::middleware([])
->group(
function () {
// guest:web middleware specified in AuthController
Auth::routes(
[
'login' => true,
'logout' => true,
'register' => false,
'reset' => false, // for resetting passwords
'confirm' => false, // for additional password confirmations
'verify' => false, // for email verification
]
);
}
);
Route::middleware(['auth:web'])
->group(
function () {
Route::get(
'/',
[
HomeController::class,
'home'
]
)->name('home');
Route::resources(
[
'sliders' => SlidersController::class,
'slides' => SlidesController::class,
]
);
Route::get(
'/slide/change-order/{slide}/{action}',
[
SlidesController::class,
'changeOrder'
]
)->name('slides.change-order');
}
);
}
);
Route::get('/', [ControllersHomeController::class, 'index'])->name('home');
Route::view('/la-marque', 'front.a-propos')->name('wasup');
Route::view('/le-produit', 'front.product')->name('product');
Route::view('/les-produits', 'front.products-list')->name('products');
Route::view('/les-gammes', 'front.gammes')->name('gammes');
Route::view('/les-categories', 'front.categorie')->name('categories');
Route::view('/les-actualites', 'front.news')->name('news');
Route::get(
'/contact',
[
ControllersContactController::class,
'contact'
]
)->name('contact');
Route::post(
'/contact',
[
ControllersContactController::class,
'contactSubmit'
]
)->name('contact.submit');
Route::view('/food-service', 'front.food-service')->name('food');
Route::view('/mentions-legales', 'front.legals')->name('cgu');
Route::view('/charte-confidentialite', 'front.policy')->name('policy');
Route::view('/plan-site', 'front.site-map')->name('site-map');