spatie / laravel-menu
Html menu generator for Laravel
Fund package maintenance!
spatie.be/open-source/support-us
Installs: 2 123 122
Dependents: 26
Suggesters: 1
Security: 0
Stars: 923
Watchers: 26
Forks: 83
Open Issues: 0
Requires
- php: ^8.0
- illuminate/auth: ^8.0|^9.0|^10.0|^11.0
- illuminate/contracts: ^8.71|^9.0|^10.0|^11.0
- illuminate/support: ^8.71|^9.0|^10.0|^11.0
- spatie/menu: ^3.0
Requires (Dev)
- fakerphp/faker: ^1.9
- orchestra/testbench: ^6.23|^7.0|^8.0|^9.0
- pestphp/pest: ^1.22|^2.34
- phpunit/phpunit: ^9.4|^10.5
- dev-main
- 4.2.0
- 4.1.2
- 4.1.1
- 4.1.0
- 4.0.1
- 4.0.0
- 3.7.1
- 3.7.0
- 3.6.0
- 3.5.1
- 3.5.0
- 3.4.0
- 3.3.1
- 3.3.0
- 3.2.1
- 3.2.0
- 3.1.1
- 3.1.0
- 3.0.0
- 2.1.5
- 2.1.4
- 2.1.3
- 2.1.2
- 2.1.1
- 2.1.0
- 2.0.3
- 2.0.2
- 2.0.1
- 2.0.0
- 2.0.0-beta.4
- 2.0.0-beta.3
- 2.0.0-beta.2
- 2.0.0-beta.1
- 1.3.0
- 1.2.0
- 1.1.0
- 1.0.0
- 0.5.3
- 0.5.2
- 0.5.1
- 0.5.0
- 0.4.5
- 0.4.4
- 0.4.3
- 0.4.2
- 0.4.1
- 0.4.0
- 0.3.1
- 0.3.0
- 0.2.0
- 0.1
This package is auto-updated.
Last update: 2024-10-27 13:26:28 UTC
README
This is the Laravel version of our menu package adds some extras like convenience methods for generating URLs and macros.
Documentation is available at https://spatie.be/docs/menu.
Upgrading from version 1? There's a guide for that!
Menu::macro('main', function () { return Menu::new() ->action('HomeController@index', 'Home') ->action('AboutController@index', 'About') ->action('ContactController@index', 'Contact') ->setActiveFromRequest(); });
<nav class="navigation"> {!! Menu::main() !!} </nav>
Spatie is a webdesign agency based in Antwerp, Belgium. You'll find an overview of all our open source projects on our website.
Support us
We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products.
We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall.
Installation
You can install the package via composer:
composer require spatie/laravel-menu
Usage
Documentation is available at https://spatie.be/docs/menu.
Changelog
Please see CHANGELOG for more information what has changed recently.
Testing
$ phpunit
Contributing
Please see CONTRIBUTING for details.
Security
If you've found a bug regarding security please mail security@spatie.be instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.