62 lines
1.9 KiB
PHP
62 lines
1.9 KiB
PHP
<?php
|
|
|
|
use Diglactic\Breadcrumbs\Breadcrumbs;
|
|
|
|
// Home
|
|
Breadcrumbs::for('home', function ($trail) {
|
|
$trail->push(__('Accueil'), route('home'));
|
|
});
|
|
|
|
// First Level
|
|
Breadcrumbs::for('contact', function ($trail) {
|
|
$trail->parent('home');
|
|
$trail->push(__('Contactez-nous'), route('contact'));
|
|
});
|
|
Breadcrumbs::for('legal-notice', function ($trail) {
|
|
$trail->parent('home');
|
|
$trail->push(__('Mentions légales'), route('legal-notice'));
|
|
});
|
|
Breadcrumbs::for('privacy', function ($trail) {
|
|
$trail->parent('home');
|
|
$trail->push(__('Politique de confidentialité'), route('privacy'));
|
|
});
|
|
Breadcrumbs::for('faq', function ($trail) {
|
|
$trail->parent('home');
|
|
$trail->push(__('Foire aux questions'), route('faq'));
|
|
});
|
|
Breadcrumbs::for('terms', function ($trail) {
|
|
$trail->parent('home');
|
|
$trail->push(__('Conditions générales de vente'), route('terms'));
|
|
});
|
|
//auth
|
|
Breadcrumbs::for('auth.login', function ($trail) {
|
|
$trail->parent('home');
|
|
$trail->push(__('Connexion'), route('auth.login'));
|
|
});
|
|
Breadcrumbs::for('auth.register', function ($trail) {
|
|
$trail->parent('home');
|
|
$trail->push(__('Inscription'), route('auth.register'));
|
|
});
|
|
|
|
|
|
Breadcrumbs::for('ranges', function ($trail) {
|
|
$trail->parent('home');
|
|
$trail->push(__('Gammes'), route('ranges'));
|
|
});
|
|
Breadcrumbs::for('products', function ($trail) {
|
|
$trail->parent('home');
|
|
$trail->push(__('Tous les produits'), route('products'));
|
|
});
|
|
|
|
// Second level
|
|
Breadcrumbs::for('range', function ($trail, $gamme) {
|
|
$trail->parent('ranges');
|
|
$trail->push( $gamme->name , route('range', ['rangeSlug' => $gamme->slug]));
|
|
});
|
|
|
|
// Third Level
|
|
Breadcrumbs::for('product', function ($trail, $product) {
|
|
$trail->parent('range', $product->range);
|
|
$trail->push( $product->name, route('product', ['productSlug' => $product->slug]));
|
|
//ucfirst(str_replace('-',' ',$productSlug))
|
|
});
|