71 lines
2.4 KiB
PHP
71 lines
2.4 KiB
PHP
<?php // routes/breadcrumbs.php
|
|
|
|
// Note: Laravel will automatically resolve `Breadcrumbs::` without
|
|
// this import. This is nice for IDE syntax and refactoring.
|
|
use App\Models\Client;
|
|
use App\Models\ClientCase;
|
|
use Diglactic\Breadcrumbs\Breadcrumbs;
|
|
|
|
// This import is also not required, and you could replace `BreadcrumbTrail $trail`
|
|
// with `$trail`. This is nice for IDE type checking and completion.
|
|
use Diglactic\Breadcrumbs\Generator as BreadcrumbTrail;
|
|
|
|
Breadcrumbs::for('settings.contractConfigs.index', function (BreadcrumbTrail $trail): void {
|
|
$trail->parent('settings');
|
|
$trail->push('Contract Configs', route('settings.contractConfigs.index'));
|
|
});
|
|
|
|
// Dashboard
|
|
Breadcrumbs::for('dashboard', function (BreadcrumbTrail $trail) {
|
|
$trail->push('Nadzorna plošča', route('dashboard'));
|
|
});
|
|
|
|
// Dashboard > Clients
|
|
Breadcrumbs::for('client', function (BreadcrumbTrail $trail) {
|
|
$trail->parent('dashboard');
|
|
$trail->push('Naročniki', route('client'));
|
|
});
|
|
|
|
// Dashboard > Clients > [Client]
|
|
Breadcrumbs::for('client.show', function (BreadcrumbTrail $trail, Client $client) {
|
|
$trail->parent('client');
|
|
$trail->push($client->person->full_name, route('client.show', $client));
|
|
});
|
|
|
|
// Dashboard > Cases
|
|
|
|
Breadcrumbs::for('clientCase', function (BreadcrumbTrail $trail) {
|
|
$trail->parent('dashboard');
|
|
$trail->push('Primeri', route('clientCase'));
|
|
});
|
|
|
|
// Dashboard > Cases > [Case]
|
|
|
|
Breadcrumbs::for('clientCase.show', function (BreadcrumbTrail $trail, ClientCase $clientCase) {
|
|
$trail->parent('clientCase');
|
|
$trail->push($clientCase->person->full_name, route('clientCase.show', $clientCase));
|
|
});
|
|
|
|
// Dashboard > Settings
|
|
Breadcrumbs::for('settings', function (BreadcrumbTrail $trail) {
|
|
$trail->parent('dashboard');
|
|
$trail->push('Nastavitve', route('settings'));
|
|
});
|
|
|
|
// Dashboard > Settings > Segments
|
|
Breadcrumbs::for('settings.segments', function (BreadcrumbTrail $trail) {
|
|
$trail->parent('settings');
|
|
$trail->push('Segmenti', route('settings.segments'));
|
|
});
|
|
|
|
// Dashboard > Settings > Workflow
|
|
Breadcrumbs::for('settings.workflow', function (BreadcrumbTrail $trail) {
|
|
$trail->parent('settings');
|
|
$trail->push('Potek dela', route('settings.workflow'));
|
|
});
|
|
|
|
// Dashboard > Settings > Field Job
|
|
Breadcrumbs::for('settings.fieldjob.index', function (BreadcrumbTrail $trail) {
|
|
$trail->parent('settings');
|
|
$trail->push('Terensko delo', route('settings.fieldjob.index'));
|
|
}); |