PHP code example of hoangphison / laravel-menu

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

    

hoangphison / laravel-menu example snippets


Menu::macro('main', function () {
    return Menu::newMenu()
        ->action('HomeController@index', 'Home')
        ->action('AboutController@index', 'About')
        ->action('ContactController@index', 'Contact')
        ->setActiveFromRequest();
});