144 lines
5.6 KiB
PHP
144 lines
5.6 KiB
PHP
<?php
|
|
|
|
use App\Models\ActivityLog;
|
|
use App\Models\Brand;
|
|
use App\Models\Font;
|
|
use App\Models\Product;
|
|
use App\Models\Range;
|
|
use App\Models\Settings;
|
|
use App\Models\User;
|
|
use Diglactic\Breadcrumbs\Breadcrumbs;
|
|
use Diglactic\Breadcrumbs\Generator;
|
|
use Illuminate\Support\Str;
|
|
|
|
// * USERS
|
|
Breadcrumbs::for('bo.users.index', function (Generator $trail) {
|
|
$trail->push(
|
|
Str::of(trans('models.classes.user'))->plural()->ucfirst(),
|
|
route('bo.users.index', ['sort_col' => 'updated_at', 'sort_way' => 'desc'])
|
|
);
|
|
});
|
|
Breadcrumbs::for('bo.users.create', function (Generator $trail) {
|
|
$trail->parent('bo.users.index');
|
|
$trail->push(Str::ucfirst(trans('crud.actions.create')), route('bo.users.create'));
|
|
});
|
|
Breadcrumbs::for('bo.users.edit', function (Generator $trail, User $user) {
|
|
$trail->parent('bo.users.index');
|
|
$trail->push(Str::ucfirst(trans('crud.actions.edit')), route('bo.users.edit', ['user' => $user]));
|
|
});
|
|
Breadcrumbs::for('bo.users.duplicate', function (Generator $trail) {
|
|
$trail->parent('bo.users.index');
|
|
$trail->push(Str::ucfirst(trans('crud.actions.duplicate')));
|
|
});
|
|
|
|
// * ACTIVITY_LOGS
|
|
Breadcrumbs::for('bo.activity_logs.index', function (Generator $trail) {
|
|
$trail->push(
|
|
Str::ucfirst(trans_choice('models.classes.activity_log', 2)),
|
|
route('bo.activity_logs.index', ['tenant' => tenant(), 'sort_col' => 'created_at', 'sort_way' => 'desc'])
|
|
);
|
|
});
|
|
Breadcrumbs::for('bo.activity_logs.show', function (Generator $trail, ActivityLog $activity_log) {
|
|
$trail->parent('bo.activity_logs.index');
|
|
$trail->push(
|
|
Str::ucfirst(trans('crud.actions.view')),
|
|
route('bo.activity_logs.show', ['tenant' => tenant(), 'activity_log' => $activity_log])
|
|
);
|
|
});
|
|
|
|
// * BRANDS
|
|
Breadcrumbs::for('bo.brands.index', function (Generator $trail) {
|
|
$trail->push(
|
|
Str::of(trans_choice('models.classes.brand', 2))->ucfirst(),
|
|
route('bo.brands.index', ['tenant' => tenant(), 'sort_col' => 'updated_at', 'sort_way' => 'desc'])
|
|
);
|
|
});
|
|
Breadcrumbs::for('bo.brands.create', function (Generator $trail) {
|
|
$trail->parent('bo.brands.index');
|
|
$trail->push(Str::ucfirst(trans('crud.actions.create')), route('bo.brands.create', ['tenant' => tenant()]));
|
|
});
|
|
Breadcrumbs::for('bo.brands.edit', function (Generator $trail, Brand $brand) {
|
|
$trail->parent('bo.brands.index');
|
|
$trail->push(
|
|
Str::ucfirst(trans('crud.actions.edit')),
|
|
route('bo.brands.edit', ['tenant' => tenant(), 'brand' => $brand])
|
|
);
|
|
});
|
|
|
|
// * FONTS
|
|
Breadcrumbs::for('bo.fonts.index', function (Generator $trail) {
|
|
$trail->push(
|
|
Str::of(trans_choice('models.classes.font', 2))->ucfirst(),
|
|
route('bo.fonts.index', ['tenant' => tenant(), 'sort_col' => 'updated_at', 'sort_way' => 'desc'])
|
|
);
|
|
});
|
|
Breadcrumbs::for('bo.fonts.create', function (Generator $trail) {
|
|
$trail->parent('bo.fonts.index');
|
|
$trail->push(Str::ucfirst(trans('crud.actions.create')), route('bo.fonts.create', ['tenant' => tenant()]));
|
|
});
|
|
Breadcrumbs::for('bo.fonts.edit', function (Generator $trail, Font $font) {
|
|
$trail->parent('bo.fonts.index');
|
|
$trail->push(
|
|
Str::ucfirst(trans('crud.actions.edit')),
|
|
route('bo.fonts.edit', ['tenant' => tenant(), 'font' => $font])
|
|
);
|
|
});
|
|
|
|
// * RANGES
|
|
Breadcrumbs::for('bo.ranges.index', function (Generator $trail) {
|
|
$trail->push(
|
|
Str::of(trans_choice('models.classes.range', 2))->ucfirst(),
|
|
route('bo.ranges.index', ['tenant' => tenant(), 'sort_col' => 'updated_at', 'sort_way' => 'desc'])
|
|
);
|
|
});
|
|
Breadcrumbs::for('bo.ranges.create', function (Generator $trail) {
|
|
$trail->parent('bo.ranges.index');
|
|
$trail->push(Str::ucfirst(trans('crud.actions.create')), route('bo.ranges.create', ['tenant' => tenant()]));
|
|
});
|
|
Breadcrumbs::for('bo.ranges.edit', function (Generator $trail, Range $range) {
|
|
$trail->parent('bo.ranges.index');
|
|
$trail->push(
|
|
Str::ucfirst(trans('crud.actions.edit')),
|
|
route('bo.ranges.edit', ['tenant' => tenant(), 'range' => $range])
|
|
);
|
|
});
|
|
|
|
// * PRODUCTS
|
|
Breadcrumbs::for('bo.products.index', function (Generator $trail) {
|
|
$trail->push(
|
|
Str::of(trans_choice('models.classes.product', 2))->ucfirst(),
|
|
route('bo.products.index', ['tenant' => tenant(), 'sort_col' => 'updated_at', 'sort_way' => 'desc'])
|
|
);
|
|
});
|
|
Breadcrumbs::for('bo.products.create', function (Generator $trail) {
|
|
$trail->parent('bo.products.index');
|
|
$trail->push(Str::ucfirst(trans('crud.actions.create')), route('bo.products.create', ['tenant' => tenant()]));
|
|
});
|
|
Breadcrumbs::for('bo.products.edit', function (Generator $trail, Product $product) {
|
|
$trail->parent('bo.products.index');
|
|
$trail->push(
|
|
Str::ucfirst(trans('crud.actions.edit')),
|
|
route('bo.products.edit', ['tenant' => tenant(), 'product' => $product])
|
|
);
|
|
});
|
|
|
|
// * SETTINGS
|
|
Breadcrumbs::for('bo.settings.edit', function (Generator $trail, Settings $settings) {
|
|
$trail->push(Str::of(trans('models.classes.settings'))->ucfirst());
|
|
$trail->push(
|
|
Str::ucfirst(trans('crud.actions.edit')),
|
|
route('bo.settings.edit', ['tenant' => \tenant(), 'settings' => $settings])
|
|
);
|
|
});
|
|
|
|
// * TENANTS
|
|
Breadcrumbs::for('bo.tenants.index', function (Generator $trail) {
|
|
$trail->push(
|
|
Str::of(__('models.classes.tenant'))->plural()->ucfirst(),
|
|
route('bo.tenants.index', ['tenant' => tenant(), 'sort_col' => 'updated_at', 'sort_way' => 'desc'])
|
|
);
|
|
});
|
|
Breadcrumbs::for('bo.tenants.create', function (Generator $trail) {
|
|
$trail->parent('bo.tenants.index');
|
|
$trail->push(Str::ucfirst(trans('crud.actions.create')), route('bo.tenants.create', ['tenant' => tenant()]));
|
|
});
|