FEATURE: main menu works quite fine.
Currently, main menu is generated using pingpong/menus. Menu is generated in service provider called AdminProvider. Currently, menu is rendered with Bootstrap classes, I need to rewrite style in order to implement it in Foundation.
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class AdminProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Bootstrap the application services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
// create instance of main menu
|
||||
\Menu::create('mainMenu', function ($menu) {
|
||||
/**
|
||||
* @var $menu \Pingpong\Menus\MenuBuilder
|
||||
*/
|
||||
|
||||
// create menu entries
|
||||
|
||||
/*
|
||||
* WARNING: MenuBuilder::route() does not seem to work,
|
||||
* nor route() helper function. We need to use action() helper instaed.
|
||||
*/
|
||||
$menu->url(action('Admin\\Dashboard@getIndex'), trans('admin/mainMenu.dashboard'));
|
||||
});
|
||||
|
||||
// create menu with user profile
|
||||
\Menu::create('profileMenu', function ($menu) {
|
||||
// @todo add profile menu
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the application services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user