ldc-doux/routes/web.php

108 lines
3.8 KiB
PHP
Raw Normal View History

2021-11-18 14:36:06 +01:00
<?php
/**
* Routes file
2021-12-06 08:51:51 +01:00
*
2021-11-18 14:36:06 +01:00
* @category Description
* @package Category
* @author Name <email@email.com>
* @license www.url.com MIT
* @link Tag
2021-12-01 09:01:04 +01:00
* phpcs:ignore PEAR.Commenting.FileComment.MissingVersion
2021-11-18 14:36:06 +01:00
*/
2021-12-01 09:01:04 +01:00
use App\Http\Controllers\Bo\HomeController;
2021-12-06 08:51:51 +01:00
use App\Http\Controllers\Bo\SlidersController;
use App\Http\Controllers\Bo\SlidesController;
2021-12-01 09:01:04 +01:00
use App\Http\Controllers\HomeController as ControllersHomeController;
use App\Http\Controllers\ContactController as ControllersContactController;
2021-11-18 14:36:06 +01:00
use Illuminate\Support\Facades\Route;
2021-12-01 09:01:04 +01:00
use Illuminate\Support\Facades\Auth;
2021-11-18 14:36:06 +01:00
/*
|--------------------------------------------------------------------------
| 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!
|
*/
2021-12-01 09:01:04 +01:00
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(
[
2021-12-06 08:51:51 +01:00
'sliders' => SlidersController::class,
'slides' => SlidesController::class,
2021-12-01 09:01:04 +01:00
]
);
2021-12-06 08:51:51 +01:00
Route::get(
2021-12-06 16:27:44 +01:00
'/slide/change-order/{slide}/{action}',
2021-12-06 08:51:51 +01:00
[
SlidesController::class,
'changeOrder'
]
)->name('slides.change-order');
2021-12-01 09:01:04 +01:00
}
);
}
);
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');