ikpanel
  • Getting started
  • Introduction
    • Configuration
      • Policy
      • Navigation menu
      • Dashboard
    • Backup & Restore
      • SCP
      • Dropbox
    • Users
    • Roles
  • Modules
    • Blog
    • Calendar
    • Gallery
    • Newsletter
    • E-Commerce
  • Extend
    • Module Development
Powered by GitBook
On this page
  • # Item
  • # Folder
  • # Add item inside folder

Was this helpful?

  1. Introduction
  2. Configuration

Navigation menu

Navigation menu in ikpanel is fully customizable. You can add or every item within the "menu" table.

There's two kinds of element that you can implement: folder and item.

+ Settings <folder>
    - User  <item>
    - Role <item>
    - Widget <item>
+ Article <folder>
    - new <item>
    - edit <item>    

# Item

Items are the main navigation tool. It's used to navigate in our application. To add a new item you've just to create new migration/seed like the following.

class NewItem extends Migration {

    public function up(){
    
        // Create new item in navigation menu
        Menu::insert([
            'id'       => 'USERS',
            'id_token' => 'MANAGE_USER',
            'name'     => 'Manage users',
            'route'    => '/users',
            'icon'     => 'fas fa-users',
            'relation' => null
        ]);
    }
    
    public function down(){
        Menu::where('id','=','USERS')
            ->delete()
    }

}

# Folder

A folder is an item without a link. It's usually used to create a group of link. You can create a new folder with a new migration/seed.

class NewFolder extends Migration {

    public function up(){
    
        // Create new folder in navigation menu
        Menu::insert([
            'id'       => 'FOLDER_SETTINGS',
	        'id_token' => 'SHOW_SETTINGS',
	        'name'     => 'Settings',
	        'route'    => null,
	        'icon'     => 'fas fa-cogs',
	        'relation' => null
        ]);
    }
				
    public function down(){
        Menu::where('id','=','FOLDER_SETTINGS')
            ->delete();
    }    
}

# Add item inside folder

You can add items inside a folder by adding a folder foreign key in relation column.

Menu::insert([
    'id'       => 'USERS',
    'id_token' => 'MANAGE_USER',
    'name'     => 'Manage users',
    'route'    => '/users',
    'icon'     => 'fas fa-users',
    'relation' => 'FOLDER_SETTINGS' // Folder foreign key
]);
PreviousPolicyNextDashboard

Last updated 6 years ago

Was this helpful?