use SleepingOwl\Admin\Navigation\Page;
return [
// /*
[
'title' => 'География',
'priority' => 900,
'icon' => 'fa fa-compass',
'pages' => [
(new Page())->setPages(function (Page $page) {
$page->addPage([
'title' => 'Субъекты',
'icon'=>'fa fa-address-book',
'priority' => 100,
'model' => \App\Subject::class,
'badge' => function() {
return \App\Subject::count();
}
]);
$page->addPage(\App\Subject::class);
}),
(new Page())->setPages(function (Page $page1) {
$page1->addPage([
'title' => 'Города',
'icon'=>'fa fa-address-book',
'priority' => 200,
'model' => \App\Cit::class,
'badge' => function() {
return \App\Cit::count();
}
]);
$page1->addPage(\App\Cit::class);
}),
]
]
// */
];