lavary/laravel-menu

Add interface for add and some other method

Opened this issue · 2 comments

Hello,
in the builder, the item and probably other place we have a add method that take the same parameters. Why not add an interface with it. This allow some global method custom made easily.

Is this something you're interested in taking a pass at adding?

it's just an helper for the syntax, here it is a small example

	private function addRoute($menu, string $route, string $label): Item
	{
		return $menu->add(trans($label), ['route' => $route]);
	}

here the "$menu" could have been typed