cleanup route files

This commit is contained in:
Jérémy Munsch 2022-03-08 09:46:17 +01:00
parent b4ebf0549f
commit 8dc3131fc4
No known key found for this signature in database
GPG key ID: 55196BEE445F6049
4 changed files with 13 additions and 66 deletions

View file

@ -1,18 +1 @@
<?php
use Illuminate\Http\Request;
/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/
Route::middleware('auth:api')->get('/user', function (Request $request) {
return $request->user();
});

View file

@ -1,16 +1 @@
<?php
/*
|--------------------------------------------------------------------------
| Broadcast Channels
|--------------------------------------------------------------------------
|
| Here you may register all of the event broadcasting channels that your
| application supports. The given channel authorization callbacks are
| used to check if an authenticated user can listen to the channel.
|
*/
Broadcast::channel('App.User.{id}', function ($user, $id) {
return (int)$user->id === (int)$id;
});

View file

@ -1,18 +1 @@
<?php
use Illuminate\Foundation\Inspiring;
/*
|--------------------------------------------------------------------------
| Console Routes
|--------------------------------------------------------------------------
|
| This file is where you may define all of your Closure based console
| commands. Each Closure is bound to a command instance allowing a
| simple approach to interacting with each command's IO methods.
|
*/
Artisan::command('inspire', function () {
$this->comment(Inspiring::quote());
})->describe('Display an inspiring quote');

View file

@ -1,17 +1,13 @@
<?php
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the within a group which
| contains the "web" middleware group. Now create something great!
|RouteServiceProvider
*/
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Route;
Auth::routes(['verify' => false, 'register' => false, 'reset' => false]);
Auth::routes([
'verify' => false,
'register' => false,
'reset' => false
]);
Route::prefix('bo')->name('bo.')->middleware('auth')->group(function () {
Route::resource('eleveur', 'EleveurController')->except(['show']);
@ -29,7 +25,7 @@ Route::prefix('bo')->name('bo.')->middleware('auth')->group(function () {
Route::post('/find-my-box', 'AjaxController@findMyBox');
// LABELS
// * LABELS
Route::get('/{id}/labels-et-certifications', function ($id) {
return view('themes.loue.labels_and_certifs', ['id' => $id]);
})->name('labelCertif');
@ -51,7 +47,7 @@ Route::get('/{id}/label-fermiers', function ($id) {
})->name('labelFermiers');
// INFOS ELEVAGE
// * INFOS ELEVAGE
Route::get('/{id}/infos-elevages', function ($id) {
return view('themes.loue.infos_elevages', ['id' => $id]);
})->name('infoElevage');
@ -63,21 +59,21 @@ Route::get('/{id}/elevage-liberte', function ($id) {
})->name('infoElevageLib');
// ALIMENTATION
// * ALIMENTATION
Route::get('/{id}/details-alimentation', function ($id) {
return view('themes.loue.details-alimentation', ['id' => $id]);
})->name('infoAlim');
// EMBALLAGE
// * EMBALLAGE
Route::get('/{id}/details-emballage', function ($id) {
return view('themes.loue.details-emballage', ['id' => $id]);
})->name('infoEmballage');
// ELEVEURS
// * ELEVEURS
Route::get('/{id}/portrait-eleveur/{eleveurId}', 'FrontController@EleveurPortrait')->name('portraitEleveur');
// return view('themes.loue.elevages.portrait');
Route::get('/charte-confidentialite', function () {
return view('themes.loue.policy');
})->name('policy');