PackageTrack
Sign in Get early access

spatie/menu

Html menu generator

3.2.1 3.1M downloads/mo #4087 most downloaded on Packagist spatie/menu

What this package is like to depend on

Last release 1 years ago

13 Jun 2025

Release timing varies

gaps range from 8 days to 2.2 years

Most releases are documented

notes for 34 of 51 stable releases

Nothing withdrawn

no release was ever pulled

10 years old

55 releases · first in 2016

0 releases in the last 12 months

see the full history below

Release timeline

55 releases · Feb 2016 to Jun 2025
2017 2018 2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 55
  1. 3.2.1 13 Jun 2025
    Release notes

    What's Changed

    New Contributors

    Full Changelog: 3.2.0...3.2.1

    Open source →
    Release notes

    What's Changed

    • Fix wrapping in Bootstrap menu code example by @buddhaCode in https://github.com/spatie/menu/pull/148
    • Add hint to the spiritual successor by @buddhaCode in https://github.com/spatie/menu/pull/149
    • ci: fix deprecations in the ci and improve it by @Chris53897 in https://github.com/spatie/menu/pull/152
    • refactor(check): simplified final comparison to directly return boolean result by @Ayoub-Mabrouk in https://github.com/spatie/menu/pull/155
    • refactor: simplify isActive() by combining prepend check into return by @Ayoub-Mabrouk in https://github.com/spatie/menu/pull/154

    New Contributors

    • @buddhaCode made their first contribution in https://github.com/spatie/menu/pull/148
    • @Chris53897 made their first contribution in https://github.com/spatie/menu/pull/152
    • @Ayoub-Mabrouk made their first contribution in https://github.com/spatie/menu/pull/155

    Full Changelog: https://github.com/spatie/menu/compare/3.2.0...3.2.1

    Open source →
  2. 3.2.0 12 Apr 2023
    Release notes

    What's Changed

    New Contributors

    Full Changelog: 3.1.1...3.2.0

    Open source →
    Release notes

    What's Changed

    • Make ->setExactActive() accept a callable as well by @ralphjsmit in https://github.com/spatie/menu/pull/146

    New Contributors

    • @ralphjsmit made their first contribution in https://github.com/spatie/menu/pull/146

    Full Changelog: https://github.com/spatie/menu/compare/3.1.1...3.2.0

    Open source →
  3. 3.1.1 13 Mar 2023
    Release notes
    • fix active classes

    What's Changed

    Full Changelog: 3.1.0...3.1.1

    Open source →
    Release notes
    • fix active classes

    What's Changed

    • Add id to docs by @milwad-dev in https://github.com/spatie/menu/pull/144

    Full Changelog: https://github.com/spatie/menu/compare/3.1.0...3.1.1

    Open source →
  4. 3.1.0 10 Mar 2023
    Release notes

    What's Changed

    New Contributors

    Full Changelog: 3.0.1...3.1.0

    Open source →
    Release notes

    What's Changed

    • typofix in item-attributes.md by @davidjr82 in https://github.com/spatie/menu/pull/138
    • Add PHP 8.2 Support by @patinthehat in https://github.com/spatie/menu/pull/141
    • Refactor tests to pest by @AyoobMH in https://github.com/spatie/menu/pull/142
    • Add id attribute for menu by @milwad-dev in https://github.com/spatie/menu/pull/143

    New Contributors

    • @davidjr82 made their first contribution in https://github.com/spatie/menu/pull/138
    • @AyoobMH made their first contribution in https://github.com/spatie/menu/pull/142
    • @milwad-dev made their first contribution in https://github.com/spatie/menu/pull/143

    Full Changelog: https://github.com/spatie/menu/compare/3.0.1...3.1.0

    Open source →
  5. 3.0.1 11 Nov 2021
    Release notes
    • update deps
    Open source →
  6. 3.0.0 24 Mar 2021
    Release notes
    • Support PHP 8+
    • Drop support for PHP 7.x
    • Use PHP 8 syntax where possible
    Open source →
    Release notes
    • Support PHP 8+
    • Drop support for PHP 7.x
    • Use PHP 8 syntax where possible
    Open source →
  7. 2.10.3 16 Mar 2021
    Release notes
    • Ensure Items are transformed to string before prepending or appending
    Open source →
    Release notes
    • Ensure Items are transformed to string before prepending or appending
    Open source →
  8. 2.10.2 02 Dec 2020
    Release notes
    • Fix methods_exists check in PHP8
    Open source →
    Release notes
    • Fix methods_exists check in PHP8
    Open source →
  9. 2.10.1 02 Dec 2020
    Release notes
    • Ensure the necessary methods exist to check if a menu is active
    Open source →
    Release notes
    • Ensure the necessary methods exist to check if a menu is active
    Open source →
  10. 2.10.0 02 Dec 2020
    Release notes
    • Support Item instances in Menu::prepend so headers can be set active
    Open source →
    Release notes
    • Support Item instances in Menu::prepend so headers can be set active
    Open source →
  11. 2.9.0 06 Nov 2020
    Release notes
    • Drop support for versions older than PHP 7.1
    Open source →
  12. 2.8.0 05 Nov 2018
    Release notes
    • Add exact-active class to links that exactly match the current URL. This is accompanied by a setExactActiveClass(string $class) method to set the class name
    Open source →
  13. 2.7.0 23 Oct 2018
    Release notes
    • Add IteratorAggregate interface to Menu class
    Open source →
  14. 2.6.0 10 Sep 2018
    Release notes
    • Add beforeRender and willRender hooks that are called when an item is rendered
    Open source →
  15. 2.5.0 02 Mar 2018
    Release notes
    • This release adds a few methods to create non-ul menus, which allows for Bootstrap 4 compatibility
    • Added Menu::setWrapperTag and Menu::withoutWrapperTag to set a custom wrapper tag name for the menu list. Default: ul
    • Added Menu::setParentTag & Menu::withoutParentTag to determine which tag should be used for the item's parent element. Default: li
    • Added Menu::setActiveClassOnLink and Menu::setActiveClassOnParent to determine where the active class should be applied
    Open source →
  16. 2.4.1 13 Nov 2017
    Release notes
    • Allow invokable classes as callbacks
    Open source →
  17. 2.4.0 17 Oct 2017
    Release notes
    • Added Menu::empty and Html::empty method for adding empty list items
    Open source →
  18. 2.3.1 29 Aug 2017
    Release notes
    • Extracted a ActiveUrlChecker class for public use
    Open source →
  19. 2.3.0 28 Aug 2017
    Release notes
    • Added append and prepend methods to Link
    Open source →
  20. 2.2.2 11 Jul 2017
    Release notes
    • Fixed returning a menu instance is now optional with fill and build
    Open source →
  21. 2.2.1 07 Mar 2017
    Release notes
    • Fixed setting items active with urls that start with the same string
    Open source →
  22. 2.2.0 09 Feb 2017
    Release notes
    • Added if function
    Open source →
  23. 2.1.3 02 Feb 2017
    Release notes
    • Fixed setting an active url when the url is exactly the same
    Open source →
  24. 2.1.2 02 Feb 2017

    Nothing published for this version

  25. 2.1.1 25 Jan 2017
    Release notes
    • Added the request root path when setting the active path
    Open source →
  26. 2.1.0 24 Nov 2016
    Release notes
    • Added optional third $initial parameter in Menu::build
    Open source →
  27. 2.0.1 11 Oct 2016
    Release notes
    • Fixed require ^1.0.0 of spatie/url
    Open source →
  28. 2.0.0 27 Sep 2016
    Release notes
    • Added added the static Menu::build and non-static Menu::fill methods to create menu's from arrays.
    • Added the setActive method on Activatable now also accepts a non-strict boolean or callable parameter to set $active to true or false.
    • Added Menu::html and Menu::htmlIf now accept a $parentAttributes array as their second arguments.
    • Changed the HtmlAttributes and ParentAttributes traits have been renamed to HasHtmlAttributes and HasParentAttributes.
    • Changed the HasUrl interface and trait has been removed. Url-related methods now also are part of the Activatable interface and trait.
    • Removed the void and voidIf have been removed. These can be replaced by html and htmlIf, with empty strings as their first arguments
    • Removed the prefixLinks and prefixUrls methods have been removed because they were too unpredictable in some case. There currently isn't an alternative for these, besides writing your own logic and applying it with applyToAll.
    Open source →
  29. 2.0.0-beta.4 27 Sep 2016 pre-release

    Nothing published for this version

  30. 2.0.0-beta.3 26 Sep 2016 pre-release

    Nothing published for this version

  31. 2.0.0-beta.2 26 Sep 2016 pre-release

    Nothing published for this version

  32. 2.0.0-beta.1 21 Sep 2016 pre-release

    Nothing published for this version

  33. 1.4.0 02 Sep 2016
    Release notes
    • Added a HasUrl trait
    • Deprecated prefixLinks in favor of prefixUrls
    Open source →
  34. 1.3.0 29 Aug 2016
    Release notes
    • Added submenuIf
    Open source →
  35. 1.2.1 01 Aug 2016
    Release notes
    • Internal refactors
    Open source →
  36. 1.2.0 25 Jun 2016
    Release notes
    • New methods on Menu:

      • submenu for submenus with optional headers
      • void and voidIf for empty list items
      • wrap to wrap the menu in an html tag with optional attributes
      • A blueprint method to copy the menu without it's contents
      • Html item convenience methods: addItemClass, setItemAttribute
      • Html parent convenience methods: addItemParentClass, setItemParentAttribute
    • Added HasHtmlAttributes and HasParentAttributes interfaces

    • HtmlAttributes and ParentAttributes now also have a setAttributes method

    Open source →
  37. 1.1.1 04 Apr 2016
    Release notes
    • Fixed setActive when setting active from a URL
    Open source →
  38. 1.1.0 30 Mar 2016
    Release notes
    • Added conditional add functions, addIf, linkIf and htmlIf
    Open source →
  39. 1.0.0 24 Mar 2016
    Release notes
    • First release
    Open source →
  40. 0.6.6 24 Mar 2016

    Nothing published for this version

  41. 0.6.5 21 Mar 2016

    Nothing published for this version

  42. 0.6.4 18 Mar 2016

    Nothing published for this version

  43. 0.6.3 18 Mar 2016

    Nothing published for this version

  44. 0.6.2 18 Mar 2016

    Nothing published for this version

  45. 0.6.1 18 Mar 2016

    Nothing published for this version

  46. 0.6.0 18 Mar 2016

    Nothing published for this version

  47. 0.5.3 14 Mar 2016

    Nothing published for this version

  48. 0.5.2 11 Mar 2016

    Nothing published for this version

  49. 0.5.1 11 Mar 2016

    Nothing published for this version

  50. 0.5.0 10 Mar 2016

    Nothing published for this version

  51. 0.4.1 09 Mar 2016

    Nothing published for this version

  52. 0.4.0 09 Mar 2016

    Nothing published for this version

  53. 0.3.0 09 Mar 2016

    Nothing published for this version

  54. 0.2.0 09 Mar 2016

    Nothing published for this version

  55. 0.1 25 Feb 2016

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive