You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Menu::make creates a Builder instance and adds it to its internal $menu array before calling the callback. This way users can't use a subclass of Builder with custom methods implementing per-application helpers to drastically reduce Boilerplate code.
This can be changed in two ways:
The OOP way: Add $builder=null argument to Menu::make and that builder instance (if not null) will be used instead of a newly created one. This way a user can give a subclass of Builder and have convenient methods for his/her own application.
The Laravel Way: Make the Builder class Macroable, just by using the Trait Macroable.
The text was updated successfully, but these errors were encountered:
Menu::make creates a Builder instance and adds it to its internal $menu array before calling the callback. This way users can't use a subclass of Builder with custom methods implementing per-application helpers to drastically reduce Boilerplate code.
This can be changed in two ways:
The OOP way: Add $builder=null argument to Menu::make and that builder instance (if not null) will be used instead of a newly created one. This way a user can give a subclass of Builder and have convenient methods for his/her own application.
The Laravel Way: Make the Builder class Macroable, just by using the Trait Macroable.
The text was updated successfully, but these errors were encountered: