Basic menus designed for but not dependend on Laravel.
Via Displore Core
$ php artisan displore:install menus
This does everything for you, from the Composer requirement to the addition of Laravel service providers.
$ composer require displore/menus
This requires the addition of the Menus service provider and Menus facade alias to config/app.php if you use the package with Laravel.
Displore\Menus\MenusServiceProvider::class,
and
Displore\Menus\Facades\Menu::class,
Run the following command to publish the configuration file in which you can set the different menus.
$ php artisan vendor:publish --tag=displore.menus.config
This package comes with a very basic implementation of a menu builder. By binding the Displore\Core\Contracts\MenuBuilder
interface to another class you can easily swap it, for example with the excellent menu package created by Spatie.
As an example, You can pass the menu from the configuration to your views in a controller:
$menu = Menu::from(Config::get('displore.menu'))->build('main');
return view('index')->with($menu);
Please see changelog for more information what has changed recently.
The package comes with unit tests. In a Laravel application, with Laravel Packager:
$ php artisan packager:git *Displore Github url*
$ php artisan packager:tests Displore Menus
$ phpunit
Please see contributing for details.
The EUPL License. Please see the License File for more information.