- Menambahkan rute untuk manajemen pelanggan dan email blast. - Mengimplementasikan breadcrumb untuk navigasi yang lebih baik. - Memperbarui file module.json untuk menambahkan menu baru.
58 lines
2.1 KiB
PHP
58 lines
2.1 KiB
PHP
<?php
|
|
|
|
use Diglactic\Breadcrumbs\Breadcrumbs;
|
|
use Diglactic\Breadcrumbs\Generator as BreadcrumbTrail;
|
|
|
|
// Home
|
|
Breadcrumbs::for('home', function (BreadcrumbTrail $trail) {
|
|
$trail->push('Home', route('dashboard'));
|
|
});
|
|
|
|
// Home > Customers
|
|
Breadcrumbs::for('customer.index', function (BreadcrumbTrail $trail) {
|
|
$trail->parent('home');
|
|
$trail->push('Customers', route('customer.index'));
|
|
});
|
|
|
|
// Home > Customers > Create
|
|
Breadcrumbs::for('customer.create', function (BreadcrumbTrail $trail) {
|
|
$trail->parent('customer.index');
|
|
$trail->push('Create Customer', route('customer.create'));
|
|
});
|
|
|
|
// Home > Customers > [Customer Name]
|
|
Breadcrumbs::for('customer.show', function (BreadcrumbTrail $trail, $customer) {
|
|
$trail->parent('customer.index');
|
|
$trail->push($customer->name, route('customer.show', $customer));
|
|
});
|
|
|
|
// Home > Customers > [Customer Name] > Edit
|
|
Breadcrumbs::for('customer.edit', function (BreadcrumbTrail $trail, $customer) {
|
|
$trail->parent('customer.show', $customer);
|
|
$trail->push('Edit', route('customer.edit', $customer));
|
|
});
|
|
|
|
// Home > Email Blasts
|
|
Breadcrumbs::for('emailblast.index', function (BreadcrumbTrail $trail) {
|
|
$trail->parent('home');
|
|
$trail->push('Email Blasts', route('emailblast.index'));
|
|
});
|
|
|
|
// Home > Email Blasts > Create
|
|
Breadcrumbs::for('emailblast.create', function (BreadcrumbTrail $trail) {
|
|
$trail->parent('emailblast.index');
|
|
$trail->push('Create Email Blast', route('emailblast.create'));
|
|
});
|
|
|
|
// Home > Email Blasts > View Email Blast
|
|
Breadcrumbs::for('emailblast.view', function (BreadcrumbTrail $trail, $emailBlast) {
|
|
$trail->parent('emailblast.index');
|
|
$trail->push('View Email Blast', route('emailblast.view', $emailBlast->id));
|
|
});
|
|
|
|
// Home > Email Blasts > Edit Email Blast
|
|
Breadcrumbs::for('emailblast.edit', function (BreadcrumbTrail $trail, $emailBlast) {
|
|
$trail->parent('emailblast.index');
|
|
$trail->push('Edit Email Blast', route('emailblast.edit', $emailBlast->id));
|
|
});
|