fix: prevent 500 when there's no + remove fo.commitments.index route
This commit is contained in:
parent
3ec1dc7787
commit
a2d8c2e97d
5 changed files with 7 additions and 6 deletions
|
|
@ -23,7 +23,8 @@ return [
|
|||
'fo.news.index',
|
||||
'fo.products.index',
|
||||
'fo.recipes.index',
|
||||
'fo.commitments.index',
|
||||
// FIXME: En attente d'une évolution. Le blade est actuellement vide. A décommenter quand ça sera décidé.
|
||||
// 'fo.commitments.index',
|
||||
'fo.commitments.brand',
|
||||
'fo.commitments.raise',
|
||||
'fo.commitments.eat',
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
@hasSection('breadcrumb')
|
||||
@if (Breadcrumbs::exists(app()->view->getSections()['breadcrumb']))
|
||||
@if (Breadcrumbs::exists(app()->view->getSections()['breadcrumb']) && isset($brParam))
|
||||
{{ call_user_func_array(
|
||||
'Breadcrumbs::view',
|
||||
array_merge(['breadcrumbs::json-ld', app()->view->getSections()['breadcrumb']], Arr::wrap($brParam)),
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@
|
|||
window.__SYSTEM._routes['bo.submeats.json-paginate'] = '{{ route('bo.submeats.json-paginate') }}';
|
||||
window.__SYSTEM._routes['bo.claims.json-paginate'] = '{{ route('bo.claims.json-paginate') }}';
|
||||
window.__SYSTEM._routes['fo.recipes.index'] = '{{ route('fo.recipes.index') }}';
|
||||
window.__SYSTEM._routes['fo.commitments.index'] = '{{ route('fo.commitments.index') }}';
|
||||
window.__SYSTEM._routes['fo.brand.story'] = '{{ route('fo.brand.story') }}';
|
||||
window.__SYSTEM._routes['fo.breeding.index'] = '{{ route('fo.breeding.index') }}';
|
||||
window.__SYSTEM._routes['fo.recruitment.show'] = '{{ route('fo.recruitment.show') }}';
|
||||
|
|
|
|||
|
|
@ -76,8 +76,8 @@ Breadcrumbs::for('fo.recipes.search.submeat', function (Generator $trail) {
|
|||
// * COMMITMENTS
|
||||
Breadcrumbs::for('fo.commitments.index', function (Generator $trail) {
|
||||
$trail->parent('fo.home.show');
|
||||
// FIXME: Le lien ci-dessous doit etre .index après la MEP.
|
||||
$trail->push(Str::of(trans('nos engagements'))->ucfirst(), route('fo.commitments.brand'));
|
||||
// FIXME: Le lien ci-dessous doit etre fo.commitments.index après la MEP.
|
||||
$trail->push(Str::of(trans('nos engagements'))->ucfirst());
|
||||
});
|
||||
Breadcrumbs::for('fo.commitments.brand', function (Generator $trail) {
|
||||
$trail->parent('fo.commitments.index');
|
||||
|
|
|
|||
|
|
@ -120,7 +120,8 @@ Route::middleware(['throttle:web'])->name('fo.')->group(function () {
|
|||
Route::prefix('engagements')
|
||||
->name('commitments.')
|
||||
->group(function () {
|
||||
Route::view('/', 'fo.pages.commitments.index')->name('index');
|
||||
// FIXME: En attente d'une évolution. Le blade est actuellement vide. A décommenter quand ça sera décidé.
|
||||
// Route::view('/', 'fo.pages.commitments.index')->name('index');
|
||||
Route::view('/la-marque-100-francaise', 'fo.pages.commitments.brand')->name('brand');
|
||||
Route::view('/elever-durablement', 'fo.pages.commitments.raise')->name('raise');
|
||||
Route::view('/bien-nourrir-les-francais', 'fo.pages.commitments.eat')->name('eat');
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue