CMS / Coding / Pages Integration
Pages Integration
-
Admin side
1. Source code
1. Download source code, copy and paste into the root folder of the project
Source Code2. Route
add following code into the route/admin.php
use App\Http\Controllers\admin\PageController;
Route::get('/page',[PageController::class, 'index'])->name('admin.page'); Route::get('/page/form',[PageController::class, 'form'])->name('admin.page.form'); Route::post('/page/save',[PageController::class, 'save'])->name('admin.page.save'); Route::delete('/page/delete',[PageController::class, 'delete'])->name('admin.page.delete'); Route::put('/page/status',[PageController::class, 'status'])->name('admin.page.status'); Route::post('/page/priority', [PageController::class, 'priority'])->name('admin.page.priority'); Route::post('/page/save/description',[PageController::class, 'save_description'])->name('admin.page.save.description'); 3. DB
1. table : pages
CREATE TABLE `pages` ( `id` int NOT NULL, `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `sub_title` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `slug_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `short_description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `image` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `large_image` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `category_id` int DEFAULT NULL, `amount` decimal(20,2) DEFAULT NULL, `meta_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `meta_keyword` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `meta_description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `meta_code` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `identifier` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `custom_fields` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `status` enum('1','0') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '1', `priority` int DEFAULT NULL, `blade_name` char(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `is_featured` enum('0','1') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '0', `deleted_by` int DEFAULT NULL, `created_at` date DEFAULT NULL, `updated_at` date DEFAULT NULL, `deleted_at` datetime DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; ALTER TABLE `pages` ADD PRIMARY KEY (`id`); ALTER TABLE `pages` MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1; Sample data
INSERT INTO `pages` (`id`, `title`, `sub_title`, `slug_url`, `content`, `short_description`, `image`, `large_image`, `category_id`, `amount`, `meta_title`, `meta_keyword`, `meta_description`, `meta_code`, `identifier`, `custom_fields`, `status`, `priority`, `blade_name`, `is_featured`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (1, 'Vacation', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'cms', NULL, '1', NULL, 'content', '0', NULL, '2023-04-16', '2023-04-17', NULL); 2. table :page_layouts
CREATE TABLE `page_layouts` ( `id` char(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `title` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL, `table_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `identifier` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `status` enum('1','0') CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '1', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; ALTER TABLE `page_layouts` ADD PRIMARY KEY (`id`); Data
INSERT INTO `page_layouts` (`id`, `title`, `table_name`, `identifier`, `status`, `created_at`, `updated_at`) VALUES ('content', 'Content Page', 'pages', NULL, '1', NULL, NULL); 3. table : admin_menus
CREATE TABLE `admin_menus` ( `id` bigint UNSIGNED NOT NULL, `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `parent_id` int NOT NULL, `admin_access` enum('0','1') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '0', `icon` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `admin_route` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `identifier` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `query_str` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `custom_fields` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `status` enum('1','0') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '1', `priority` int NOT NULL, `deleted_at` timestamp NULL DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; ALTER TABLE `admin_menus` ADD PRIMARY KEY (`id`); ALTER TABLE `admin_menus` MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1; Data
INSERT INTO `admin_menus` (`id`, `title`, `parent_id`, `admin_access`, `icon`, `admin_route`, `identifier`, `query_str`, `custom_fields`, `status`, `priority`, `deleted_at`, `created_at`, `updated_at`) VALUES (2, 'Pages', 1, '0', 'fas fa-university', 'admin.page', 'cms', '', '{\"grid\":{\"header\":[\r\n {\"title\":\"Priority\",\"field\":\"priority\",\"type\":\"priority\",\"width\":\"5%\"},\r\n {\"title\":\"Course\",\"field\":\"title\",\"type\":\"text\",\"width\":\"\"},\r\n {\"title\":\"Fee\",\"field\":\"amount\",\"type\":\"text\",\"width\":\"\"}\r\n \r\n\r\n ],\r\n \"top_tools\":[{\"title\":\"Add New\",\"route\":\"admin.page.form\",\"type\":\"link\",\"icon\":\"fa fa-save\"},\r\n {\"title\":\"List All\",\"route\":\"admin.page\",\"type\":\"link\",\"icon\":\"fa fa-bars\"},\r\n {\"title\":\"Delete All\",\"route\":\"admin.page\",\"type\":\"delete\"}],\r\n \"right_tools\":[{\"title\":\"Edit\",\"route\":\"admin.page.form\",\"type\":\"link\"},\r\n {\"title\":\"Delete\",\"route\":\"admin.page.delete\",\"type\":\"delete\"},\r\n {\"title\":\"Status\",\"route\":\"admin.page.status\",\"type\":\"status\"}]},\r\n\"form\":{\"data\":[\r\n {\"title\":\"Title\",\"field\":\"title\",\"type\":\"text\",\"col\":\"12\", \"class\":\"mandatory\",\"message\":\"Please enter title\"},\r\n{\"title\":\"Page Layout\",\"field\":\"blade_name\",\"type\":\"select\",\"col\":\"12\",\"section_table\":\"page_layouts\"}\r\n \r\n \r\n],\r\n\"top_tools\":[{\"title\":\"Add New\",\"route\":\"admin.page.form\",\"type\":\"link\",\"icon\":\"fa fa-save\"},\r\n {\"title\":\"List All\",\"route\":\"admin.page\",\"type\":\"link\",\"icon\":\"fa fa-bars\",\"class\":\"btn_list_all\"}], \r\n \"bottom_tools\":[{\"title\":\"Save\",\"route\":\"admin.page.form\",\"type\":\"submit\"},\r\n {\"title\":\"Cancel\",\"route\":\"admin.page\",\"type\":\"link\"}]\r\n}}', '1', 1, NULL, NULL, NULL); 4. table: admin_menu_activities
CREATE TABLE `admin_menu_activities` ( `id` bigint UNSIGNED NOT NULL, `menu_identifier` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `activity_identifier` char(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `admin_menu_id` int DEFAULT NULL, `title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `icon` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `admin_route` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `position` char(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `type` char(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `status` enum('1','0') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '1', `priority` int DEFAULT NULL, `deleted_at` timestamp NULL DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; ALTER TABLE `admin_menu_activities` ADD PRIMARY KEY (`id`); ALTER TABLE `admin_menu_activities` MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1; Data
INSERT INTO `admin_menu_activities` (`id`, `menu_identifier`, `activity_identifier`, `admin_menu_id`, `title`, `icon`, `admin_route`, `position`, `type`, `status`, `priority`, `deleted_at`, `created_at`, `updated_at`) VALUES (1, 'cms', 'view', 87, NULL, NULL, NULL, NULL, NULL, '1', NULL, NULL, NULL, NULL), (2, 'cms', 'create', 87, NULL, NULL, NULL, NULL, NULL, '1', NULL, NULL, NULL, NULL), (3, 'cms', 'edit', 87, NULL, NULL, NULL, NULL, NULL, '1', NULL, NULL, NULL, NULL), (4, 'cms', 'delete', 87, NULL, NULL, NULL, NULL, NULL, '1', NULL, NULL, NULL, NULL), (5, 'cms', 'status', 87, NULL, NULL, NULL, NULL, NULL, '1', NULL, NULL, NULL, NULL); 5. table :admin_menu_activity_masters
CREATE TABLE `admin_menu_activity_masters` ( `id` bigint UNSIGNED NOT NULL, `activity_identifier` char(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `priority` int DEFAULT NULL, `deleted_at` timestamp NULL DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; ALTER TABLE `admin_menu_activity_masters` ADD PRIMARY KEY (`id`); ALTER TABLE `admin_menu_activity_masters` MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1; data
Simple Form structure (in admin_menus)INSERT INTO `admin_menu_activity_masters` (`id`, `activity_identifier`, `title`, `priority`, `deleted_at`, `created_at`, `updated_at`) VALUES (1, 'create', 'Create', 2, NULL, NULL, NULL), (2, 'edit', 'Edit', 3, NULL, NULL, NULL), (3, 'view', 'View', 1, NULL, NULL, NULL), (4, 'delete', 'Delete', 4, NULL, NULL, NULL), (5, 'status', 'Status', 5, NULL, NULL, NULL);
Form with tab (in admin_menus){"grid":{"header":[ {"title":"Priority","field":"priority","type":"priority","width":"5%"}, {"title":"Course","field":"title","type":"text","width":""}, {"title":"Fee","field":"amount","type":"text","width":""} ], "top_tools":[{"title":"Add New","route":"admin.page.form","type":"link","icon":"fa fa-save"}, {"title":"List All","route":"admin.page","type":"link","icon":"fa fa-bars"}, {"title":"Delete All","route":"admin.page","type":"delete"}], "right_tools":[{"title":"Edit","route":"admin.page.form","type":"link"}, {"title":"Delete","route":"admin.page.delete","type":"delete"}, {"title":"Status","route":"admin.page.status","type":"status"}]}, "form":{"data":[ {"title":"Title","field":"title","type":"text","col":"12", "class":"mandatory","message":"Please enter title"}, {"title":"Page Layout","field":"layout_id","type":"select","col":"12","section_table":"page_layouts"} ], "top_tools":[{"title":"Add New","route":"admin.page.form","type":"link","icon":"fa fa-save"}, {"title":"List All","route":"admin.page","type":"link","icon":"fa fa-bars","class":"btn_list_all"}], "bottom_tools":[{"title":"Save","route":"admin.page.form","type":"submit"}, {"title":"Cancel","route":"admin.page","type":"link"}] }} {"grid":{"header":[ {"title":"Priority","field":"priority","type":"priority","width":"5%"}, {"title":"Course","field":"title","type":"text","width":""}, {"title":"Fee","field":"amount","type":"text","width":""} ], "top_tools":[{"title":"Add New","route":"admin.page.form","type":"link","icon":"fa fa-save"}, {"title":"List All","route":"admin.page","type":"link","icon":"fa fa-bars"}, {"title":"Delete All","route":"admin.page","type":"delete"}], "right_tools":[{"title":"Edit","route":"admin.page.form","type":"link"}, {"title":"Delete","route":"admin.page.delete","type":"delete"}, {"title":"Status","route":"admin.page.status","type":"status"}]}, "form":{ "data":[ {"title":"Title","field":"title","type":"text","col":"12", "class":"mandatory","message":"Please enter title"}, {"title":"Page Layout","field":"layout_id","type":"select","col":"12","section_table":"page_layouts"} ], "tabs": [ {"title":"Basic Info","identifier":"basics","route":"admin.page.form"}, {"title":"Meta Info","identifier":"meta","route":"admin.page.form"} ], "top_tools":[{"title":"Add New","route":"admin.page.form","type":"link","icon":"fa fa-save"}, {"title":"List All","route":"admin.page","type":"link","icon":"fa fa-bars","class":"btn_list_all"}], "bottom_tools":[{"title":"Save","route":"admin.page.form","type":"submit"}, {"title":"Cancel","route":"admin.page","type":"link"}] }} -
Fe side
1. Route
Route::get('/{slug}', [HomeController::class, 'content'])->name('content'); 2. controller
public function content(Request $r,$slug) { $this->data['pages']=Page::leftJoin('page_layouts','page_layouts.id','pages.layout_id')->where('pages.slug_url',$slug) ->orWhere('pages.id', $slug) ->select('pages.*', 'page_layouts.blade_name','page_layouts.table_name','page_layouts.identifier as section_identifier', 'page_layouts.query_str') ->first(); $this->data['pageTitle']=$this->data['pages']['title']; $view=isset($this->data['pages']['blade_name']) ? $this->data['pages']['blade_name'] : 'content'; if(isset($this->data['pages']['table_name'])){ $this->data['listData']=DB::table($this->data['pages']['table_name']) ->where('identifier', $this->data['pages']['section_identifier']) ->get(); } return view('fe.'.$view,$this->data); } 3. in menu
if(isset($news)) foreach($news as $val) if(isset($val->slug_url) && $val->slug_url!=''){ $url=$val->slug_url; } else{ $url=$val->id; } {$val->title} endforeach endif -
Widgets
Widget listing
1. DB
widget_masters
widget_contentsCREATE TABLE `widget_masters` ( `id` bigint(20) UNSIGNED NOT NULL, `title` varchar(1000) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `visibility` enum('all','home','inner') DEFAULT 'all', `widget_identifier` char(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, `custom_fields` longtext DEFAULT NULL, `status` enum('1','0') CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT '1', `deleted_at` timestamp NULL DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; ALTER TABLE `widget_masters` ADD PRIMARY KEY (`id`); ALTER TABLE `widget_masters` MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9; CREATE TABLE `widget_contents` ( `id` bigint(20) UNSIGNED NOT NULL, `custom_fields` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, `page_id` int(11) DEFAULT NULL, `widget_identifier` char(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, `status` enum('1','0') CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT '1', `deleted_at` timestamp NULL DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; ALTER TABLE `widget_contents` ADD PRIMARY KEY (`id`); ALTER TABLE `widget_contents` MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16; 2. structure
1. Form
2. Form & list{ "form":[{"title":"Title","field":"title","type":"select","col":"6","section_table":"pages", "identifier" : "products"}, {"title":"Content","field":"content","type":"editor","col":"12"} ] }
3. Featured selection{ "form":[{"title":"Title","field":"title","type":"text","col":"6"}, {"title":"Content","field":"content","type":"editor","col":"12"} ], "grid":[{"title":"Title","field":"title","type":"text","col":"6"} ] }
4. File{ "form":[ {"title":"Title","field":"title","type":"featured_section","col":"6", "section_table":"pages", "identifier" : "products"} ] } { "form":[{"title":"Title","field":"title","type":"file","col":"6","class":"image"}, {"title":"Content","field":"content","type":"editor","col":"12"} ], "grid":[{"title":"Title","field":"title","type":"text","col":"6"} ] } -
Gallery
1. DB
CREATE TABLE `galleries` ( `id` bigint(20) UNSIGNED NOT NULL, `title` varchar(1000) NOT NULL, `image` varchar(1000) DEFAULT NULL, `image_alt_text` varchar(500) DEFAULT NULL, `large_image` varchar(255) DEFAULT NULL, `category_id` int(11) DEFAULT NULL, `identifier` char(25) DEFAULT NULL, `is_featured` enum('0','1') DEFAULT NULL, `status` enum('1','0') DEFAULT '1', `priority` int(11) DEFAULT NULL, `deleted_by` int(11) DEFAULT NULL, `deleted_at` timestamp NULL DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; ALTER TABLE `galleries` ADD PRIMARY KEY (`id`); ALTER TABLE `galleries` MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1; 2. record in admin_menu
INSERT INTO `admin_menus` (`id`, `title`, `parent_id`, `admin_access`, `icon`, `admin_route`, `identifier`, `query_str`, `custom_fields`, `status`, `priority`, `deleted_at`, `created_at`, `updated_at`) VALUES (79, 'Awards', 1, '0', 'fas fa-ambulance', 'admin.gallery', 'awards', NULL, NULL, '1', 1, NULL, NULL, NULL); 1. admin_route is admin.gallery
2. identifier is {custom_identifier}
-
Downloads
1. DB
CREATE TABLE `downloads` ( `id` bigint(20) UNSIGNED NOT NULL, `title` varchar(1000) NOT NULL, `image` varchar(255) DEFAULT NULL, `category_id` int(11) DEFAULT NULL, `identifier` char(25) DEFAULT NULL, `is_featured` enum('0','1') DEFAULT NULL, `status` enum('1','0') DEFAULT '1', `priority` int(11) DEFAULT NULL, `deleted_by` int(11) DEFAULT NULL, `deleted_at` timestamp NULL DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; ALTER TABLE `downloads` ADD PRIMARY KEY (`id`); ALTER TABLE `downloads` MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; 2. record in admin_menu
INSERT INTO `admin_menus` (`id`, `title`, `parent_id`, `admin_access`, `icon`, `admin_route`, `identifier`, `query_str`, `custom_fields`, `status`, `priority`, `deleted_at`, `created_at`, `updated_at`) VALUES (90, 'Download', 1, '0', 'fas fa-ambulance', 'admin.download', 'download', NULL, NULL, '1', 1, NULL, NULL, NULL); 1. admin_route is admin.download
2. identifier is {custom_identifier}
-
Masters
1. DB
CREATE TABLE `masters` ( `id` bigint(20) UNSIGNED NOT NULL, `title` varchar(1000) NOT NULL, `sub_title` varchar(255) DEFAULT NULL, `image` varchar(255) DEFAULT NULL, `priority` int(11) DEFAULT NULL, `identifier` char(25) NOT NULL, `status` enum('1','0') DEFAULT '1', `deleted_by` int(11) DEFAULT NULL, `deleted_at` timestamp NULL DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; ALTER TABLE `masters` ADD PRIMARY KEY (`id`); ALTER TABLE `masters` MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1; 2. record in admin_menu
INSERT INTO `admin_menus` (`id`, `title`, `parent_id`, `admin_access`, `icon`, `admin_route`, `identifier`, `query_str`, `custom_fields`, `status`, `priority`, `deleted_at`, `created_at`, `updated_at`) VALUES (70, 'Course Category', 7, '0', 'fas fa-address-book', 'admin.master', 'course_category', '', '{\"grid\":{\"header\":[\r\n {\"title\":\"Title\",\"field\":\"title\",\"type\":\"text\",\"width\":\"100%\"} \r\n ],\r\n \"top_tools\":[{\"title\":\"Add New\",\"route\":\"admin.pages.form\",\"type\":\"link\"},\r\n {\"title\":\"List All\",\"route\":\"admin.pages\",\"type\":\"link\"}\r\n ],\r\n \"right_tools\":[{\"title\":\"Edit\",\"route\":\"admin.pages.form\",\"type\":\"link\"},\r\n {\"title\":\"Delete\",\"route\":\"admin.pages.delete\",\"type\":\"delete\"},\r\n {\"title\":\"Status\",\"route\":\"admin.pages.status\",\"type\":\"status\"}]},\r\n\"form\":{\"data\":[{\"title\":\"Title\",\"field\":\"title\",\"type\":\"text\",\"col\":\"12\",\"class\":\"mandatory\", \"message\":\"Please enter value\"}\r\n \r\n \r\n \r\n],\r\n\"top_tools\":[{\"title\":\"Add New\",\"route\":\"admin.pages.form\",\"type\":\"link\"},\r\n {\"title\":\"List All\",\"route\":\"admin.pages\",\"type\":\"link\"}], \r\n \"bottom_tools\":[{\"title\":\"Save\",\"route\":\"admin.pages.form\",\"type\":\"submit\"},\r\n {\"title\":\"Cancel\",\"route\":\"admin.pages\",\"type\":\"link\"}]\r\n}}', '1', 1, NULL, NULL, NULL); 1. admin_route is admin.master
2. identifier is {custom_identifier}