PHPackages                             kaishiyoku/laravel-menu - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. kaishiyoku/laravel-menu

AbandonedArchivedLibrary

kaishiyoku/laravel-menu
=======================

Create menus for Laravel with css-class highlighting support

4.5.2(5y ago)51.7k[2 issues](https://github.com/Kaishiyoku/laravel-menu/issues)MITPHPPHP &gt;=7.2.5

Since Dec 30Pushed 5y ago1 watchersCompare

[ Source](https://github.com/Kaishiyoku/laravel-menu)[ Packagist](https://packagist.org/packages/kaishiyoku/laravel-menu)[ RSS](/packages/kaishiyoku-laravel-menu/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (10)Dependencies (6)Versions (36)Used By (0)

[![Maintenance](https://camo.githubusercontent.com/0080c39e8991e448d139858f9038668b6078ad14a26bacb65acf2ec3bfa9d661/68747470733a2f2f696d672e736869656c64732e696f2f6d61696e74656e616e63652f7965732f323032302e737667)](https://camo.githubusercontent.com/0080c39e8991e448d139858f9038668b6078ad14a26bacb65acf2ec3bfa9d661/68747470733a2f2f696d672e736869656c64732e696f2f6d61696e74656e616e63652f7965732f323032302e737667)[![Packagist](https://camo.githubusercontent.com/9852e16743a31758f01b865207432794629bbbdd6ec7630e4c6f2104e651730a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b6169736869796f6b752f6c61726176656c2d6d656e752e737667)](https://camo.githubusercontent.com/9852e16743a31758f01b865207432794629bbbdd6ec7630e4c6f2104e651730a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b6169736869796f6b752f6c61726176656c2d6d656e752e737667) [![Packagist](https://camo.githubusercontent.com/67515074be4b63a16c1c818c9b09cbf47bff98f9d2854c3b44e2cd324ec84583/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b6169736869796f6b752f6c61726176656c2d6d656e752e737667)](https://camo.githubusercontent.com/67515074be4b63a16c1c818c9b09cbf47bff98f9d2854c3b44e2cd324ec84583/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b6169736869796f6b752f6c61726176656c2d6d656e752e737667)

Laravel menus with automatic CSS highlighting

Table of contents
=================

[](#table-of-contents)

- [Version info](#version-info)
- [Minimum requirements](#minimum-requirements)
- [General](#general)
- [Important Information](#important-information)
- [Installation](#installation)
    - [Composer](#composer)
    - [Laravel Configuration](#laravel-configuration)
- [Usage](#usage)
- [Look &amp; Feel](#look--feel)
- [License](#license)
- [Author](#author)

Version info
============

[](#version-info)

Version 4 is a complete rework of the package. Thus breaking changes were introduced.

Minimum requirements
====================

[](#minimum-requirements)

- PHP &gt;=7.2.5
- Laravel ^6.0

General
=======

[](#general)

This package helps defining and rendering menu structures in Laravel. The main feature is the CSS highlighting of the active page. The package is coupled to Laravel and can't be used standalone.

Important Information
=====================

[](#important-information)

Please note that your routes must be named.

Installation
============

[](#installation)

Composer
--------

[](#composer)

Add `"kaishiyoku/laravel-menu": "^4.0"` to your **composer.json**by running `composer require "kaishiyoku/laravel-menu": "^4.0"`.

Update your dependencies by running `composer update`.

Laravel Configuration
---------------------

[](#laravel-configuration)

The package supports Laravel auto-discovery but if you want you can add `Kaishiyoku\LaravelMenu\ServiceProvider::class,` to the **providers** array
and `'Menu' => Kaishiyoku\LaravelMenu\Facade::class,` to the **aliases** array in **app/config/app.php**.

Usage
=====

[](#usage)

- generate a new middleware by using `php artisan make:middleware Menus`
- add `\App\Http\Middleware\Menus::class,` to the Http Kernel in `$middlewareGroups` &gt; `'web'`
- add your menus to the `handle()` method in your Menus middleware

**Example \\App\\Http\\Middleware\\Menus.php:**

```
