/home/mip/mip/database/seeds/ClientModulesTableSeeder.php
<?php

use Illuminate\Database\Seeder;
use Illuminate\Database\Eloquent\Model;

class ClientModulesTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        /*
        Two Level Only
        menu_group_id: always "1"
        target: always "#"
        parent_id: "0" if parent menu else it is child then define its parent id
        is_parent: "1" if parent menu, "0" if child menu
        has_parent: "0" no parent menu, "1" has parent menu
        show_menu: "1" to show/active, "1" hide/inactive
        has_read: always "0"
        has_create: "0" if parent menu, "1" if child menu then analyze if has create function else define it "0"
        has_update: "0" if parent menu, "1" if child menu then analyze if has update function else define it "0"
        has_delete: "0" if parent menu, "1" if child menu then analyze if has delete function else define it "0"
        has_export: "0" if parent menu, "1" if child menu then analyze if has export function else define it "0"
        has_import: "0" if parent menu, "1" if child menu then analyze if has import function else define it "0"
        has_print: "0" if parent menu, "1" if child menu then analyze if has print function else define it "0"
        created_at: always "new \Carbon\Carbon"
        updated_at: always "new \Carbon\Carbon"
        */
    	Model::unguard();
        DB::connection('qxcms')->table('client_modules')->truncate();
		DB::connection('qxcms')->table('client_modules')->insert([
            //Setting
            ['id'=>1, 'orderid' => 1, 'title'=>'Administration', 'link_type'=>'Parent', 'module_name'=>'Administration', 'module_description'=>'Administration', 'url'=>'#', 'icon'=>'cog', 'menu_group_id'=>'1', 'target'=>'#', 'parent_id'=>'0', 'is_parent'=>'1', 'has_parent'=>'0', 'show_menu'=>'1', 'has_read'=>'0', 'has_create'=>'0', 'has_update'=>'0', 'has_delete'=>'0', 'has_export'=>'0', 'has_import'=>'0', 'has_print'=>'0', 'created_at'=> new \Carbon\Carbon, 'updated_at'=> new \Carbon\Carbon],
            //Setting -> Role manager
            ['id'=>2, 'orderid' => 2, 'title'=>'Role Manager', 'link_type'=>'Child', 'module_name'=>'Role Manager', 'module_description'=>'Role Manager', 'url'=>'settings/roles', 'icon'=>'angle-double-right', 'menu_group_id'=>'1', 'target'=>'', 'parent_id'=>'1', 'is_parent'=>'0', 'has_parent'=>'1', 'show_menu'=>'1', 'has_read'=>'0', 'has_create'=>'1', 'has_update'=>'1', 'has_delete'=>'1', 'has_export'=>'0', 'has_import'=>'0', 'has_print'=>'0', 'created_at'=> new \Carbon\Carbon, 'updated_at'=> new \Carbon\Carbon],
            //Setting -> User manager
            ['id'=>3, 'orderid' => 3, 'title'=>'User Manager', 'link_type'=>'Child', 'module_name'=>'User Manager', 'module_description'=>'List of CMS User\'s', 'url'=>'settings/users', 'icon'=>'angle-double-right', 'menu_group_id'=>'1', 'target'=>'', 'parent_id'=>'1', 'is_parent'=>'0', 'has_parent'=>'1', 'show_menu'=>'1', 'has_read'=>'0', 'has_create'=>'1', 'has_update'=>'1', 'has_delete'=>'1', 'has_export'=>'0', 'has_import'=>'0', 'has_print'=>'0', 'created_at'=> new \Carbon\Carbon, 'updated_at'=> new \Carbon\Carbon],
            //Principal
            // ['id'=>4, 'orderid' => 4, 'title'=>'Client', 'link_type'=>'Parent', 'module_name'=>'Client', 'module_description'=>'Client', 'url'=>'principals', 'icon'=>'user-o', 'menu_group_id'=>'1', 'target'=>'', 'parent_id'=>'0', 'is_parent'=>'1', 'has_parent'=>'0', 'show_menu'=>'1', 'has_read'=>'0', 'has_create'=>'1', 'has_update'=>'1', 'has_delete'=>'1', 'has_export'=>'0', 'has_import'=>'0', 'has_print'=>'0', 'created_at'=> new \Carbon\Carbon, 'updated_at'=> new \Carbon\Carbon],
            //Questionnaire
            // ['id'=>5, 'orderid' => 9, 'title'=>'Questionnaire', 'link_type'=>'Parent', 'module_name'=>'Questionnaire', 'module_description'=>'A list of previously created questionnaire template.', 'url'=>'questionnaire', 'icon'=>'question-circle-o ', 'menu_group_id'=>'1', 'target'=>'', 'parent_id'=>'0', 'is_parent'=>'1', 'has_parent'=>'0', 'show_menu'=>'1', 'has_read'=>'0', 'has_create'=>'1', 'has_update'=>'1', 'has_delete'=>'1', 'has_export'=>'1', 'has_import'=>'0', 'has_print'=>'0', 'created_at'=> new \Carbon\Carbon, 'updated_at'=> new \Carbon\Carbon],
            //Subject
            // ['id'=>6, 'orderid' => 10, 'title'=>'Subjects', 'link_type'=>'Parent', 'module_name'=>'Subject', 'module_description'=>'List of subjects', 'url'=>'subject', 'icon'=>'newspaper-o ', 'menu_group_id'=>'1', 'target'=>'', 'parent_id'=>'0', 'is_parent'=>'1', 'has_parent'=>'0', 'show_menu'=>'1', 'has_read'=>'0', 'has_create'=>'1', 'has_update'=>'1', 'has_delete'=>'1', 'has_export'=>'0', 'has_import'=>'0', 'has_print'=>'0', 'created_at'=> new \Carbon\Carbon, 'updated_at'=> new \Carbon\Carbon],
            //Directories-Stores
            ['id'=>7, 'orderid' => 4, 'title'=>'Directories and Stores', 'link_type'=>'Parent', 'module_name'=>'Directory/Store', 'module_description'=>'List of directory and stores', 'url'=>'directory-store', 'icon'=>'map-marker ', 'menu_group_id'=>'1', 'target'=>'', 'parent_id'=>'0', 'is_parent'=>'1', 'has_parent'=>'0', 'show_menu'=>'1', 'has_read'=>'0', 'has_create'=>'1', 'has_update'=>'1', 'has_delete'=>'1', 'has_export'=>'0', 'has_import'=>'0', 'has_print'=>'0', 'created_at'=> new \Carbon\Carbon, 'updated_at'=> new \Carbon\Carbon],
            //Products
            ['id'=>8, 'orderid' => 7, 'title'=>'Products', 'link_type'=>'Parent', 'module_name'=>'Product', 'module_description'=>'List of products', 'url'=>'products', 'icon'=>'product-hunt ', 'menu_group_id'=>'1', 'target'=>'', 'parent_id'=>'0', 'is_parent'=>'1', 'has_parent'=>'0', 'show_menu'=>'1', 'has_read'=>'0', 'has_create'=>'1', 'has_update'=>'1', 'has_delete'=>'1', 'has_export'=>'0', 'has_import'=>'0', 'has_print'=>'0', 'created_at'=> new \Carbon\Carbon, 'updated_at'=> new \Carbon\Carbon],
            //Posts
            ['id'=>9, 'orderid' => 6, 'title'=>'Posts', 'link_type'=>'Parent', 'module_name'=>'Post', 'module_description'=>'List of Posts', 'url'=>'posts', 'icon'=>'list-alt ', 'menu_group_id'=>'1', 'target'=>'', 'parent_id'=>'0', 'is_parent'=>'1', 'has_parent'=>'0', 'show_menu'=>'1', 'has_read'=>'0', 'has_create'=>'1', 'has_update'=>'1', 'has_delete'=>'1', 'has_export'=>'0', 'has_import'=>'0', 'has_print'=>'0', 'created_at'=> new \Carbon\Carbon, 'updated_at'=> new \Carbon\Carbon],
            //Field Officer
            // ['id'=>10, 'orderid' => 8, 'title'=>'Field Officer / Editor', 'link_type'=>'Parent', 'module_name'=>'Field Officer / Editor', 'module_description'=>'List of Field Officers & Editors', 'url'=>'officers', 'icon'=>'users', 'menu_group_id'=>'1', 'target'=>'', 'parent_id'=>'0', 'is_parent'=>'1', 'has_parent'=>'0', 'show_menu'=>'1', 'has_read'=>'0', 'has_create'=>'1', 'has_update'=>'1', 'has_delete'=>'1', 'has_export'=>'0', 'has_import'=>'0', 'has_print'=>'0', 'created_at'=> new \Carbon\Carbon, 'updated_at'=> new \Carbon\Carbon],
            //Pages
            ['id'=>12, 'orderid' => 5, 'title'=>'Pages', 'link_type'=>'Parent', 'module_name'=>'Page', 'module_description'=>'List of Pages', 'url'=>'pages', 'icon'=>'book ', 'menu_group_id'=>'1', 'target'=>'', 'parent_id'=>'0', 'is_parent'=>'1', 'has_parent'=>'0', 'show_menu'=>'1', 'has_read'=>'0', 'has_create'=>'1', 'has_update'=>'1', 'has_delete'=>'1', 'has_export'=>'0', 'has_import'=>'0', 'has_print'=>'0', 'created_at'=> new \Carbon\Carbon, 'updated_at'=> new \Carbon\Carbon],
            //Job Openings
            ['id'=>14, 'orderid' => 8, 'title'=>'Job Openings', 'link_type'=>'Parent', 'module_name'=>'Job Opening', 'module_description'=>'List of Job Openings.', 'url'=>'job-opening', 'icon'=>'newspaper-o ', 'menu_group_id'=>'1', 'target'=>'', 'parent_id'=>'0', 'is_parent'=>'1', 'has_parent'=>'0', 'show_menu'=>'1', 'has_read'=>'0', 'has_create'=>'1', 'has_update'=>'1', 'has_delete'=>'1', 'has_export'=>'0', 'has_import'=>'0', 'has_print'=>'0', 'created_at'=> new \Carbon\Carbon, 'updated_at'=> new \Carbon\Carbon],
            //Pages - Parent
            ['id'=>15, 'orderid' => 14, 'title'=>'Pages', 'link_type'=>'Parent', 'module_name'=>'Pages', 'module_description'=>'Pages', 'url'=>'#', 'icon'=>'book', 'menu_group_id'=>'1', 'target'=>'#', 'parent_id'=>'0', 'is_parent'=>'1', 'has_parent'=>'0', 'show_menu'=>'1', 'has_read'=>'0', 'has_create'=>'0', 'has_update'=>'0', 'has_delete'=>'0', 'has_export'=>'0', 'has_import'=>'0', 'has_print'=>'0', 'created_at'=> new \Carbon\Carbon, 'updated_at'=> new \Carbon\Carbon],
            //Pages -> About Us
            ['id'=>16, 'orderid' => 15, 'title'=>'About Us', 'link_type'=>'Child', 'module_name'=>'About Us', 'module_description'=>'Informations about the company.', 'url'=>'pages/about-us', 'icon'=>'info-circle', 'menu_group_id'=>'1', 'target'=>'', 'parent_id'=>'15', 'is_parent'=>'0', 'has_parent'=>'1', 'show_menu'=>'1', 'has_read'=>'0', 'has_create'=>'1', 'has_update'=>'1', 'has_delete'=>'1', 'has_export'=>'0', 'has_import'=>'0', 'has_print'=>'0', 'created_at'=> new \Carbon\Carbon, 'updated_at'=> new \Carbon\Carbon],
            //Pages -> FAQ
            ['id'=>17, 'orderid' => 16, 'title'=>'FAQ', 'link_type'=>'Child', 'module_name'=>'FAQ', 'module_description'=>'Frequently Asked Questions.', 'url'=>'pages/faq', 'icon'=>'question-circle', 'menu_group_id'=>'1', 'target'=>'', 'parent_id'=>'15', 'is_parent'=>'0', 'has_parent'=>'1', 'show_menu'=>'1', 'has_read'=>'0', 'has_create'=>'1', 'has_update'=>'1', 'has_delete'=>'1', 'has_export'=>'0', 'has_import'=>'0', 'has_print'=>'0', 'created_at'=> new \Carbon\Carbon, 'updated_at'=> new \Carbon\Carbon],
            //Pages -> Contact Us
            ['id'=>18, 'orderid' => 17, 'title'=>'Contact Us', 'link_type'=>'Child', 'module_name'=>'Contact Us', 'module_description'=>'Contact Informations.', 'url'=>'pages/contact-us', 'icon'=>'phone-square', 'menu_group_id'=>'1', 'target'=>'', 'parent_id'=>'15', 'is_parent'=>'0', 'has_parent'=>'1', 'show_menu'=>'1', 'has_read'=>'0', 'has_create'=>'1', 'has_update'=>'1', 'has_delete'=>'1', 'has_export'=>'0', 'has_import'=>'0', 'has_print'=>'0', 'created_at'=> new \Carbon\Carbon, 'updated_at'=> new \Carbon\Carbon],
            //Applicants - Parent
            ['id'=>19, 'orderid' => 11, 'title'=>'Applicants', 'link_type'=>'Parent', 'module_name'=>'Applicant', 'module_description'=>'List of open job opening with no. of applicants.', 'url'=>'#', 'icon'=>'users', 'menu_group_id'=>'1', 'target'=>'#', 'parent_id'=>'0', 'is_parent'=>'1', 'has_parent'=>'0', 'show_menu'=>'1', 'has_read'=>'0', 'has_create'=>'0', 'has_update'=>'0', 'has_delete'=>'0', 'has_export'=>'1', 'has_import'=>'0', 'has_print'=>'0', 'created_at'=> new \Carbon\Carbon, 'updated_at'=> new \Carbon\Carbon],
            //Applicants -> Search Applicant
            ['id'=>20, 'orderid' => 12, 'title'=>'Search Applicant', 'link_type'=>'Child', 'module_name'=>'Search Applicant', 'module_description'=>'Search Applicant', 'url'=>'applicants/search', 'icon'=>'search', 'menu_group_id'=>'1', 'target'=>'', 'parent_id'=>'19', 'is_parent'=>'0', 'has_parent'=>'1', 'show_menu'=>'1', 'has_read'=>'0', 'has_create'=>'0', 'has_update'=>'0', 'has_delete'=>'0', 'has_export'=>'0', 'has_import'=>'0', 'has_print'=>'0', 'created_at'=> new \Carbon\Carbon, 'updated_at'=> new \Carbon\Carbon],
            //Applicants -> Source Applicant
            ['id'=>21, 'orderid' => 13, 'title'=>'Source Applicant', 'link_type'=>'Child', 'module_name'=>'Source Applicant', 'module_description'=>'Source Applicant', 'url'=>'applicants/source', 'icon'=>'street-view', 'menu_group_id'=>'1', 'target'=>'', 'parent_id'=>'19', 'is_parent'=>'0', 'has_parent'=>'1', 'show_menu'=>'1', 'has_read'=>'0', 'has_create'=>'0', 'has_update'=>'0', 'has_delete'=>'0', 'has_export'=>'1', 'has_import'=>'0', 'has_print'=>'0', 'created_at'=> new \Carbon\Carbon, 'updated_at'=> new \Carbon\Carbon],

            //Reports
            ['id'=>11, 'orderid' => 18, 'title'=>'Reports', 'link_type'=>'Parent', 'module_name'=>'Reports', 'module_description'=>'Reports', 'url'=>'#', 'icon'=>'file-text-o', 'menu_group_id'=>'1', 'target'=>'#', 'parent_id'=>'0', 'is_parent'=>'1', 'has_parent'=>'0', 'show_menu'=>'1', 'has_read'=>'0', 'has_create'=>'0', 'has_update'=>'0', 'has_delete'=>'0', 'has_export'=>'0', 'has_import'=>'0', 'has_print'=>'0', 'created_at'=> new \Carbon\Carbon, 'updated_at'=> new \Carbon\Carbon],
            //Reports -> Audit Trail Report
            ['id'=>13, 'orderid' => 19, 'title'=>'Audit Trail Report', 'link_type'=>'Child', 'module_name'=>'Audit Trail Report', 'module_description'=>'Audit Trail Report', 'url'=>'reports/audittrail', 'icon'=>'file', 'menu_group_id'=>'1', 'target'=>'', 'parent_id'=>'11', 'is_parent'=>'0', 'has_parent'=>'1', 'show_menu'=>'1', 'has_read'=>'0', 'has_create'=>'1', 'has_update'=>'1', 'has_delete'=>'1', 'has_export'=>'1', 'has_import'=>'0', 'has_print'=>'0', 'created_at'=> new \Carbon\Carbon, 'updated_at'=> new \Carbon\Carbon],
        ]);
		$this->command->info('Client Modules table seeded!');
		Model::reguard();
    }   
}