ldc-crm/routes/breadcrumbs.php
2023-06-13 11:11:53 +02:00

27 lines
885 B
PHP

<?php
use App\Models\Brand;
use Diglactic\Breadcrumbs\Breadcrumbs;
use Diglactic\Breadcrumbs\Generator;
// * CUSTOMERS
Breadcrumbs::for('customers.index', function (Generator $trail) {
$trail->push(trans('Clients'), route('customers.index'));
});
Breadcrumbs::for('customers.show', function (Generator $trail) {
$trail->parent('customers.index');
$trail->push(trans('Aperçu'));
});
// * BRANDS
Breadcrumbs::for('brands.index', function (Generator $trail) {
$trail->push(trans('Marques'), route('brands.index'));
});
Breadcrumbs::for('brands.create', function (Generator $trail) {
$trail->parent('brands.index');
$trail->push(trans('Création'), route('brands.create'));
});
Breadcrumbs::for('brands.edit', function (Generator $trail, Brand $brand) {
$trail->parent('brands.index');
$trail->push(trans('Édition'), route('brands.edit', $brand));
});