Admin interface now has some sidebar and content area. Sidebar was supposed to be "dropdown-on-click", however I have not acomplished it yet.
51 lines
1.5 KiB
PHP
51 lines
1.5 KiB
PHP
<?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'), 1, ['icon' => 'fa fa-dashboard']);
|
|
$menu->dropdown(trans('admin/mainMenu.userManagement'), function($sub) {
|
|
$sub->url(action('Admin\UserManagement@getNewUser'), trans('admin/mainMenu.newUser'), 1, ['icon' => 'fa fa-user-plus']);
|
|
$sub->url(action('Admin\UsersManagement@getOverview', ['state' => 'all']), trans('admin/mainMenu.usersOverview'), 2, ['icon' => 'fa fa-users']);
|
|
|
|
}, ['icon' => 'fa fa-users']);
|
|
});
|
|
|
|
// create menu with user profile
|
|
\Menu::create('profileMenu', function ($menu) {
|
|
// @todo add profile menu
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Register the application services.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function register()
|
|
{
|
|
}
|
|
}
|