Skip to content

Displore/Menus

Repository files navigation

Displore Menus

Latest Version on Packagist Quality Score

Basic menus designed for but not dependend on Laravel.

Install

$ php artisan displore:install menus

This does everything for you, from the Composer requirement to the addition of Laravel service providers.

Via Composer

$ 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,

Configuration

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

Usage

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);

Change log

Please see changelog for more information what has changed recently.

Testing

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

Contributing

Please see contributing for details.

Credits

License

The EUPL License. Please see the License File for more information.

About

Basic menus designed for but not dependend on Laravel.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages