Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/spatie/laravel-menu
Html menu generator for Laravel
https://github.com/spatie/laravel-menu
generate html laravel menu navigation php
Last synced: 6 days ago
JSON representation
Html menu generator for Laravel
- Host: GitHub
- URL: https://github.com/spatie/laravel-menu
- Owner: spatie
- License: mit
- Created: 2016-02-22T19:35:39.000Z (almost 9 years ago)
- Default Branch: main
- Last Pushed: 2024-02-27T12:09:31.000Z (11 months ago)
- Last Synced: 2024-09-08T14:00:17.579Z (4 months ago)
- Topics: generate, html, laravel, menu, navigation, php
- Language: PHP
- Homepage: https://freek.dev/414-a-modern-package-to-generate-html-menus
- Size: 131 KB
- Stars: 912
- Watchers: 26
- Forks: 83
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
- awesome-laravel-framework - Laravel Menu - Html menu generator for Laravel (Popular Packages)
- laravel-awesome - Laravel Menu - Html menu generator for Laravel (Popular Packages)
- awesome-laravel - Laravel Menu - Html menu generator for Laravel (Popular Packages)
README
# Html Menu Generator for Laravel
[![Latest Version on Packagist](https://img.shields.io/packagist/v/spatie/laravel-menu.svg?style=flat-square)](https://packagist.org/packages/spatie/laravel-menu)
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)
![Test Status](https://img.shields.io/github/workflow/status/spatie/laravel-menu/run-tests?label=tests)
![Code Style Status](https://img.shields.io/github/workflow/status/spatie/laravel-menu/Check%20&%20fix%20styling?label=code%20style)
[![Total Downloads](https://img.shields.io/packagist/dt/spatie/laravel-menu.svg?style=flat-square)](https://packagist.org/packages/spatie/laravel-menu)This is the Laravel version of [our menu package](https://github.com/spatie/menu) 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](https://github.com/spatie/laravel-menu#upgrading-to-20) for that!
```php
Menu::macro('main', function () {
return Menu::new()
->action('HomeController@index', 'Home')
->action('AboutController@index', 'About')
->action('ContactController@index', 'Contact')
->setActiveFromRequest();
});
``````html
{!! Menu::main() !!}
```
Spatie is a webdesign agency based in Antwerp, Belgium. You'll find an overview of all our open source projects [on our website](https://spatie.be/opensource).
## Support us
[](https://spatie.be/github-ad-click/laravel-menu)
We invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can support us by [buying one of our paid products](https://spatie.be/open-source/support-us).
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](https://spatie.be/about-us). We publish all received postcards on [our virtual postcard wall](https://spatie.be/open-source/postcards).
## Installation
You can install the package via composer:
``` bash
composer require spatie/laravel-menu
```## Usage
Documentation is available at https://spatie.be/docs/menu.
## Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.
## Testing
``` bash
$ phpunit
```## Contributing
Please see [CONTRIBUTING](https://github.com/spatie/.github/blob/main/CONTRIBUTING.md) for details.
## Security
If you've found a bug regarding security please mail [[email protected]](mailto:[email protected]) instead of using the issue tracker.
## Credits
- [Sebastian De Deyne](https://github.com/sebastiandedeyne)
- [All Contributors](../../contributors)## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.