127 lines
4.4 KiB
PHP
127 lines
4.4 KiB
PHP
<?php
|
|
|
|
use Diglactic\Breadcrumbs\Breadcrumbs;
|
|
|
|
// Home.
|
|
Breadcrumbs::for('home', function ($trail) {
|
|
$trail->push(__('Accueil'), route('home'));
|
|
});
|
|
|
|
// First Level
|
|
// General content.
|
|
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 / inscription.
|
|
Breadcrumbs::for('auth.login', function ($trail) {
|
|
$trail->parent('home');
|
|
$trail->push(__('Connexion'), route('auth.login'));
|
|
});
|
|
Breadcrumbs::for('auth.connexion', function ($trail) {
|
|
$trail->parent('home');
|
|
$trail->push(__('Connexion'), route('auth.connexion'));
|
|
});
|
|
Breadcrumbs::for('auth.register', function ($trail) {
|
|
$trail->parent('home');
|
|
$trail->push(__('Inscription'), route('auth.register'));
|
|
});
|
|
Breadcrumbs::for('auth.register.post', function ($trail) {
|
|
$trail->parent('home');
|
|
$trail->push(__('Inscription'), route('auth.register.post'));
|
|
});
|
|
Breadcrumbs::for('auth.activer', function ($trail) {
|
|
$trail->parent('home');
|
|
$trail->push(__('Inscription'), route('auth.activer', 'fake'));
|
|
});
|
|
Breadcrumbs::for('auth.forgot-password', function ($trail) {
|
|
$trail->parent('home');
|
|
$trail->push(__('Mot de passe oublié'), route('auth.forgot-password'));
|
|
});
|
|
Breadcrumbs::for('auth.form-change-mdp', function ($trail) {
|
|
$trail->parent('home');
|
|
$trail->push(__('Changement de mot de passe'), route('auth.form-change-mdp', 'fake'));
|
|
});
|
|
Breadcrumbs::for('auth.change-password', function ($trail) {
|
|
$trail->parent('home');
|
|
$trail->push(__('Changement de mot de passe'), route('auth.change-password', 'fake'));
|
|
});
|
|
|
|
// Tunnel commande.
|
|
Breadcrumbs::for('tunnel', function ($trail) {
|
|
$trail->parent('home');
|
|
$trail->push(__('Commande'), null);
|
|
});
|
|
Breadcrumbs::for('sales.recap', function ($trail) {
|
|
$trail->parent('tunnel');
|
|
$trail->push(__('Récapitulatif'), route('sales.recap'));
|
|
});
|
|
Breadcrumbs::for('sales.pick-slot', function ($trail, $reference) {
|
|
$trail->parent('tunnel');
|
|
$trail->push(__('Retrait'), route('sales.pick-slot', ['reference' => $reference]));
|
|
});
|
|
Breadcrumbs::for('sales.confirm', function ($trail, $reference) {
|
|
$trail->parent('tunnel');
|
|
$trail->push(__('Confirmation'), route('sales.confirm', ['reference' => $reference]));
|
|
});
|
|
|
|
// Catalog.
|
|
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'));
|
|
});
|
|
Breadcrumbs::for('products.tagfilter', function ($trail, $tag) {
|
|
$trail->parent('products');
|
|
$trail->push($tag->label, route('products.tagfilter', ['tagSlug', $tag->slug]));
|
|
});
|
|
Breadcrumbs::for('search', function ($trail) {
|
|
$trail->parent('products');
|
|
$trail->push(__('Recherche'), route('search'));
|
|
});
|
|
|
|
// Account management.
|
|
Breadcrumbs::for('account.dashboard', function ($trail) {
|
|
$trail->parent('home');
|
|
$trail->push(__('Mon Compte'), route('account.dashboard'));
|
|
});
|
|
Breadcrumbs::for('account.my-orders', function ($trail) {
|
|
$trail->parent('account.dashboard');
|
|
$trail->push(__('Mes Commandes'), route('account.my-orders'));
|
|
});
|
|
Breadcrumbs::for('account.order-detail', function ($trail, $reference) {
|
|
$trail->parent('account.my-orders');
|
|
$trail->push(__('Détail Commandes'), route('account.order-detail', ['reference', $reference]));
|
|
});
|
|
|
|
// 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]));
|
|
});
|