PHP code example of skyraptor / filament-navigation

1. Go to this page and download the library: Download skyraptor/filament-navigation 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/ */

    

skyraptor / filament-navigation example snippets


use RyanChandler\FilamentNavigation\Facades\FilamentNavigation;

$menu = FilamentNavigation::get('main-menu');

use RyanChandler\FilamentNavigation\Facades\FilamentNavigation;

FilamentNavigation::addItemType('Post link', [
    Select::make('post_id')
        ->searchable()
        ->options(function () {
            return Post::pluck('title', 'id');
        })
]);

use RyanChandler\FilamentNavigation\Filament\Fields\NavigationSelect;

->schema([
    NavigationSelect::make('navigation_id'),
])

->schema([
    NavigationSelect::make('navigation_id')
        ->searchable(),
])

->schema([
    NavigationSelect::make('navigation_id')
        ->optionValue('handle'),
])
sh
php artisan vendor:publish --tag="filament-navigation-assets"