228 lines
7 KiB
PHP
228 lines
7 KiB
PHP
<?php
|
|
|
|
use App\Models\Advice;
|
|
use App\Models\News;
|
|
use App\Models\Product;
|
|
use App\Models\Range;
|
|
use Diglactic\Breadcrumbs\Breadcrumbs;
|
|
use Diglactic\Breadcrumbs\Generator;
|
|
use Illuminate\Support\Str;
|
|
|
|
// * Root
|
|
Breadcrumbs::for('fo.homepage', function (Generator $trail) {
|
|
$trail->push(Str::ucfirst(trans('Accueil')), route('fo.homepage'));
|
|
});
|
|
|
|
// * ADN
|
|
Breadcrumbs::for('fo.adn.adn', function (Generator $trail) {
|
|
$trail->parent('fo.homepage');
|
|
$trail->push(
|
|
Str::ucfirst(trans('Notre ADN')),
|
|
route('fo.adn.adn')
|
|
);
|
|
});
|
|
Breadcrumbs::for('fo.adn.btob', function (Generator $trail) {
|
|
$trail->parent('fo.homepage');
|
|
$trail->push(
|
|
Str::ucfirst(trans('Nos solutions')),
|
|
route('fo.adn.btob')
|
|
);
|
|
});
|
|
Breadcrumbs::for('fo.adn.breeder', function (Generator $trail) {
|
|
$trail->parent('fo.homepage');
|
|
$trail->push(
|
|
Str::ucfirst(trans('Nos éleveurs de volailles')),
|
|
route('fo.adn.breeder')
|
|
);
|
|
});
|
|
|
|
// * ENGAGEMENTS
|
|
Breadcrumbs::for('fo.engagments.francais', function (Generator $trail) {
|
|
$trail->parent('fo.homepage');
|
|
$trail->push(
|
|
Str::ucfirst(trans('Nos engagements / Marque alimentaire 100% Française')),
|
|
route('fo.engagments.francais')
|
|
);
|
|
});
|
|
Breadcrumbs::for('fo.engagments.eleverdurablement', function (Generator $trail) {
|
|
$trail->parent('fo.homepage');
|
|
$trail->push(
|
|
Str::ucfirst(trans('Nos engagements / Elever durablement en respectant les Hommes, les animaux et la Nature')),
|
|
route('fo.engagments.eleverdurablement')
|
|
);
|
|
});
|
|
Breadcrumbs::for('fo.engagments.biennourrir', function (Generator $trail) {
|
|
$trail->parent('fo.homepage');
|
|
$trail->push(
|
|
Str::ucfirst(trans('Nos engagements / Bien nourrir tous les Français')),
|
|
route('fo.engagments.biennourrir')
|
|
);
|
|
});
|
|
Breadcrumbs::for('fo.engagments.respecterlaterre', function (Generator $trail) {
|
|
$trail->parent('fo.homepage');
|
|
$trail->push(
|
|
Str::ucfirst(trans('Nos engagements / Respecter la Terre')),
|
|
route('fo.engagments.respecterlaterre')
|
|
);
|
|
});
|
|
Breadcrumbs::for('fo.engagments.vivreensemble', function (Generator $trail) {
|
|
$trail->parent('fo.homepage');
|
|
$trail->push(
|
|
Str::ucfirst(trans('Nos engagements / Favoriser le mieux vivre ensemble')),
|
|
route('fo.engagments.vivreensemble')
|
|
);
|
|
});
|
|
|
|
// * EXPERTISE
|
|
Breadcrumbs::for('fo.expertise.canard', function (Generator $trail) {
|
|
$trail->parent('fo.homepage');
|
|
$trail->push(
|
|
Str::ucfirst(trans('Notre expertise volaillère')),
|
|
route('fo.expertise.canard')
|
|
);
|
|
});
|
|
Breadcrumbs::for('fo.expertise.dinde', function (Generator $trail) {
|
|
$trail->parent('fo.homepage');
|
|
$trail->push(
|
|
Str::ucfirst(trans('Notre expertise volaillère')),
|
|
route('fo.expertise.dinde')
|
|
);
|
|
});
|
|
Breadcrumbs::for('fo.expertise.lapin', function (Generator $trail) {
|
|
$trail->parent('fo.homepage');
|
|
$trail->push(
|
|
Str::ucfirst(trans('Notre expertise volaillère')),
|
|
route('fo.expertise.lapin')
|
|
);
|
|
});
|
|
Breadcrumbs::for('fo.expertise.pintade', function (Generator $trail) {
|
|
$trail->parent('fo.homepage');
|
|
$trail->push(
|
|
Str::ucfirst(trans('Notre expertise volaillère')),
|
|
route('fo.expertise.pintade')
|
|
);
|
|
});
|
|
Breadcrumbs::for('fo.expertise.poulet', function (Generator $trail) {
|
|
$trail->parent('fo.homepage');
|
|
$trail->push(
|
|
Str::ucfirst(trans('Notre expertise volaillère')),
|
|
route('fo.expertise.poulet')
|
|
);
|
|
});
|
|
|
|
// * IDEES
|
|
Breadcrumbs::for('fo.ideas.ideas', function (Generator $trail) {
|
|
$trail->parent('fo.homepage');
|
|
$trail->push(
|
|
Str::ucfirst(trans("C'est bon d'être chef Gaulois.")),
|
|
route('fo.ideas.ideas')
|
|
);
|
|
});
|
|
Breadcrumbs::for('fo.ideas.tips.index', function (Generator $trail) {
|
|
$trail->parent('fo.homepage');
|
|
$trail->push(
|
|
Str::ucfirst(trans('Nos astuces volaille')),
|
|
route('fo.ideas.tips.index')
|
|
);
|
|
});
|
|
Breadcrumbs::for('fo.tips.show', function (Generator $trail, Advice $tip) {
|
|
$trail->parent('fo.ideas.tips.index');
|
|
$trail->push(
|
|
Str::ucfirst($tip->title),
|
|
route('fo.tips.show', ['publishedAdvice' => $tip])
|
|
);
|
|
});
|
|
Breadcrumbs::for('fo.ideas.recipes.index', function (Generator $trail) {
|
|
$trail->parent('fo.homepage');
|
|
$trail->push(
|
|
Str::ucfirst(trans('Nos recettes')),
|
|
route('fo.ideas.recipes.index')
|
|
);
|
|
});
|
|
Breadcrumbs::for('fo.recipes.show', function (Generator $trail, Advice $recipe) {
|
|
$trail->parent('fo.ideas.recipes.index');
|
|
$trail->push(
|
|
Str::ucfirst($recipe->title),
|
|
route('fo.recipes.show', ['publishedAdvice' => $recipe])
|
|
);
|
|
});
|
|
|
|
// * PRODUITS
|
|
Breadcrumbs::for('fo.products.index', function (Generator $trail) {
|
|
$trail->parent('fo.homepage');
|
|
$trail->push(
|
|
Str::ucfirst(trans('Nos solutions produits')),
|
|
route('fo.products.index')
|
|
);
|
|
});
|
|
Breadcrumbs::for('fo.products.range-products', function (Generator $trail, Range $range) {
|
|
$trail->parent('fo.products.index');
|
|
$trail->push(Str::ucfirst($range->label), route('fo.products.range-products', ['range' => $range]));
|
|
});
|
|
Breadcrumbs::for('fo.product.show', function (Generator $trail, Product $product) {
|
|
$trail->parent('fo.products.index');
|
|
$trail->push(
|
|
Str::ucfirst($product->subrange->range->label),
|
|
route('fo.products.range-products', ['range' => $product->subrange->range])
|
|
);
|
|
$trail->push(Str::ucfirst($product->label), route('fo.product.show', ['publishedProduct' => $product]));
|
|
});
|
|
|
|
// * ACTUALITE
|
|
Breadcrumbs::for('fo.news.index', function (Generator $trail) {
|
|
$trail->parent('fo.homepage');
|
|
$trail->push(
|
|
Str::ucfirst(trans('Nos actualités')),
|
|
route('fo.news.index')
|
|
);
|
|
});
|
|
Breadcrumbs::for('fo.news.show', function (Generator $trail, News $news) {
|
|
$trail->parent('fo.news.index');
|
|
$trail->push(
|
|
Str::ucfirst($news->slug),
|
|
route('fo.news.show', ['actu' => $news])
|
|
);
|
|
});
|
|
|
|
// * CONTACT
|
|
Breadcrumbs::for('fo.contact.show', function (Generator $trail) {
|
|
$trail->parent('fo.homepage');
|
|
$trail->push(
|
|
Str::ucfirst(trans('Contact')),
|
|
route('fo.contact.show')
|
|
);
|
|
});
|
|
|
|
// * RECHERCHE
|
|
Breadcrumbs::for('fo.search', function (Generator $trail) {
|
|
$trail->parent('fo.homepage');
|
|
$trail->push(
|
|
Str::ucfirst(trans('Résultats de recherche')),
|
|
route('fo.search')
|
|
);
|
|
});
|
|
|
|
// * FOOTER
|
|
Breadcrumbs::for('fo.policies', function (Generator $trail) {
|
|
$trail->parent('fo.homepage');
|
|
$trail->push(
|
|
Str::ucfirst(trans('Politique des données personnelles')),
|
|
route('fo.policies')
|
|
);
|
|
});
|
|
Breadcrumbs::for('fo.legals', function (Generator $trail) {
|
|
$trail->parent('fo.homepage');
|
|
$trail->push(
|
|
Str::ucfirst(trans('Mentions légales')),
|
|
route('fo.legals')
|
|
);
|
|
});
|
|
|
|
|
|
Breadcrumbs::for('fo.la-brigade', function (Generator $trail) {
|
|
$trail->parent('fo.homepage');
|
|
$trail->push(
|
|
Str::ucfirst(trans('Générateur d\'idées, révélateurs de talents')),
|
|
route('fo.la-brigade')
|
|
);
|
|
});
|