PHP code example of dluwang / navigator

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

    

dluwang / navigator example snippets


public function __construct($id, $url, $order = 1, $parent = null, array $attributes = [], array $childs = [])

$navigation->registerChild($childNavigation) // single child registration`

$navigation->registerChild([$childNavigation2, $childNavigation2]) // multiple childs registration

$navigation = new Navigation('navigation-id', 'the-url', 'the-order', 'the-parent-navigation-id');

$navigation->childs()

$navigation->child('navigation-id-wanted')

$navigator = new BaseNavigator()

$navigator->register($navigation) // single navigation registration

$navigator->register([$navigation1, $navigation2]) // mutiple navigations

$navigator->raw();

$navigator->raw('parent-id');

$navigator->navigations()

$navigator->navigations('parent-id');

$navigator->navigation('navigation-id')

public function boot() {

	// define navigation
	$navigation = ...

	$this->app->navigator->register($navigation);

}