PHP code example of accelade / navigation

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

    

accelade / navigation example snippets


use Accelade\Navigation\NavigationItem;
use Accelade\Navigation\NavigationGroup;

$navigation = [
    NavigationItem::make('Dashboard')
        ->icon('heroicon-o-home')
        ->url('/dashboard'),

    NavigationGroup::make('Content')
        ->icon('heroicon-o-folder')
        ->items([
            NavigationItem::make('Posts')
                ->icon('heroicon-o-newspaper')
                ->url('/posts')
                ->badge(fn () => Post::count()),
            NavigationItem::make('Pages')
                ->icon('heroicon-o-document')
                ->url('/pages'),
        ]),
];
bash
php artisan vendor:publish --tag="navigation-config"