This is the Laravel version of our menu package adds some extras like convenience methods for generating URLs and macros. Virtually every website displays some sort of menu. Generating html menus might seem simple, but it can become complex very quickly. Not only do you have to render some basic html, but you also have to manage which item is active. If a menu has a submenu you'll also want the parents of an active item to be active. Sometimes you want to insert some html between menu items. There are some packages out there that can help generating menus, but most of them have a messy API or have become victims of feature creep. That's why we decided to create our own modern menu package that has a beautiful API to work with. We have provided full documentation containing lots of examples. In this post I'd like to walk you through it. The spatie/menu package provides a fluent interface to build menus of any size in your php application.
Features
- Human Readable, Fluent Interface
- Strong Control Over the Html Output
- Add an ID to elements
- Not Afraid of Depths
- Some Extra Treats for Laravel Apps
- Licensed under the MIT License