caffeinated / menus

:pushpin: Menu generator package for the Laravel framework
https://caffeinatedpackages.com
132 stars 59 forks source link

Import items from autogenerated crud file #64

Open phillipmadsen opened 9 years ago

phillipmadsen commented 9 years ago

Is there a way to import the necessary items from a different file. here is an example.

public function handle($request, Closure $next) { @include('AdminMenu.php'); return $next($request); }

and inside adminmenu.php I have items that are autogenerated from my crud builder script.

Menu::make('ecommerce', function($menu) { $menu->add('Users', 'admin/users')->prepend('')->active('admin/*');; $menu->users->add('Add User', 'admin/users/create'); });

ghost commented 8 years ago

Yes, but you need to work with Menu::make() and Menu::get() methods.