PHP code example of magicoli / extra-navigation-items
1. Go to this page and download the library: Download magicoli/extra-navigation-items 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/ */
magicoli / extra-navigation-items example snippets
use Filament\Navigation\NavigationItem;
use Filament\View\PanelsRenderHook;
use Magicoli\ExtraNavigationItems\NavigationItemsPlugin;
$panel
// Cross-panel shortcuts, right before the user menu (the default hook).
->plugin(
NavigationItemsPlugin::make()->items([
NavigationItem::make()->label('Admin')->icon('heroicon-o-cog')->url('/admin'),
NavigationItem::make()->label('Calendar')->icon('heroicon-o-calendar')->url('/calendar'),
]),
)
// A credit line at the very bottom of the panel.
->plugin(
NavigationItemsPlugin::make()
->renderHook(PanelsRenderHook::FOOTER)
->items([
NavigationItem::make()
->label(config('app.name').' '.config('app.version'))
->url('https://github.com/magicoli/extra-navigation-items')
->openUrlInNewTab(),
]),
);