PHP code example of workup / collapsible-resource-manager
1. Go to this page and download the library: Download workup/collapsible-resource-manager library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
workup / collapsible-resource-manager example snippets
class NovaServiceProvider extends NovaApplicationServiceProvider {
public function boot(): void
{
//...
Nova::mainMenu(function (Request $request): array {
return [
MenuSection::make('Content', [
MenuGroup::make('User Base', [
MenuItem::resource(User::class)->icon('<svg>...</svg>'),
MenuItem::resource(Article::class)->icon('annotation'),
MenuItem::resource(Comment::class)->icon('chat-alt'),
]),
])->icon('lightning-bolt')->collapsable(),
];
});
//...
}
}