PHP code example of cyberline / filament-navigation-footermenu
1. Go to this page and download the library: Download cyberline/filament-navigation-footermenu 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/ */
cyberline / filament-navigation-footermenu example snippets
use Cyberline\FilamentNavigationFootermenu\Data\FooterMenuItem;
use Cyberline\FilamentNavigationFootermenu\FooterMenuPlugin;
public function panel(Panel $panel): Panel
{
return $panel
// ...
->plugins([
FooterMenuPlugin::make()
->triggerLabel('Legal')
->triggerIcon('heroicon-o-scale')
->items([
FooterMenuItem::make('Privacy policy')
->icon('heroicon-o-shield-check')
->url(fn () => route('legal.privacy'))
->openUrlInNewTab(),
]),
]);
}
FooterMenuPlugin::make()
->extraAttributes([
'class' => 'border-t border-gray-200 pt-3 dark:border-white/10',
])
->triggerLabel('Legal')
->items([ /* ... */ ]);
FooterMenuItem::make(string $label)
->icon(?string $icon) // Heroicon name, etc.
->url(string|Closure|null $url) // Resolved to string for links
->openUrlInNewTab(bool|Closure $open = true)
->visible(bool|Closure $visible)
->badge(string|int|Closure|null $badge, string|Closure|null $color = null)
->badgeTooltip(string|Closure|null $tooltip)
FooterMenuPlugin::make()->items([
[
'label' => 'Imprint',
'icon' => 'heroicon-o-identification',
'url' => fn () => route('legal.imprint'),
'new_tab' => true,
'badge' => '!',
'badge_color' => 'danger',
'badge_tooltip' => 'Action
FooterMenuPlugin::make()->items(fn () => [
FooterMenuItem::make('Dashboard')
->url(fn () => url('/'))
->visible(fn () => auth()->user()?->isAdmin() ?? false),
]);
FooterMenuPlugin::make()
->view('components.my-footer-menu');
__('filament-navigation-footermenu::footermenu.default_trigger_label');
return $panel
->viteTheme('resources/css/filament/admin/theme.css'); // path to your theme.css
bash
php artisan vendor:publish --tag=filament-navigation-footermenu-config
php artisan vendor:publish --tag=filament-navigation-footermenu-views
php artisan vendor:publish --tag=filament-navigation-footermenu-lang
css
@source '../../../../resources/views/vendor/filament-navigation-footermenu/**/*.blade.php';