<?php
 namespace Module;
 use LayoutMenuItem;
 use TCMS\Module;
 use Route;
 use LayoutData;
 use Model;
 class AdminSpecCateDefault extends Module {
 protected function initialize() {
 }
 protected function registerRoutes() {
 Route::get('/spec-cate-group', 'SpecCateGroupController', 'index')->name('group-index');
 Route::get('/spec-cate-group/create', 'SpecCateGroupController', 'create')->name('group-create');
 Route::post('/spec-cate-group/create', 'SpecCateGroupController', 'postCreate')->name('group-create');
 Route::get('/spec-cate-group/update/{id}', 'SpecCateGroupController', 'update')->name('group-update');
 Route::post('/spec-cate-group/update/{id}', 'SpecCateGroupController', 'postUpdate')->name('group-update');
 Route::post('/spec-cate-group/delete', 'SpecCateGroupController', 'postDelete')->name('group-delete');
 Route::get('/spec-cate', 'SpecCateController', 'index')->name('index');
 Route::get('/spec-cate/create', 'SpecCateController', 'create')->name('create');
 Route::post('/spec-cate/create', 'SpecCateController', 'postCreate')->name('create');
 Route::get('/spec-cate/update/{id}', 'SpecCateController', 'update')->name('update');
 Route::post('/spec-cate/update/{id}', 'SpecCateController', 'postUpdate')->name('update');
 Route::post('/spec-cate/delete', 'SpecCateController', 'postDelete')->name('delete');
 Route::post('/spec-cate/deletes', 'SpecCateController', 'postDeletes')->name('deletes');
 Route::post('/spec-cate/display', 'SpecCateController', 'postDisplay')->name('display');
 Route::get('/spec-cate-value', 'SpecCateValueController', 'index')->name('value-index');
 Route::get('/spec-cate-value/create', 'SpecCateValueController', 'create')->name('value-create');
 Route::post('/spec-cate-value/create', 'SpecCateValueController', 'postCreate')->name('value-create');
 Route::get('/spec-cate-value/update/{id}', 'SpecCateValueController', 'update')->name('value-update');
 Route::post('/spec-cate-value/update/{id}', 'SpecCateValueController', 'postUpdate')->name('value-update');
 Route::post('/spec-cate-value/delete/{id}', 'SpecCateValueController', 'postDelete')->name('value-delete');
 }
 public function registerComponent() {
 Model::add('SpecCateModel');
 Model::add('SpecCateValueModel');
 Model::add('SpecCateGroupModel');
 Model::add('ProductCateModel', null, null, 'ProductCateV2Model');
 }
 public function boot() {
 LayoutData::addMenuItem('spec-cate', route('index'), 'Thông số kỹ thuật', 'primary', function(LayoutMenuItem $menuItem) {
 $menuItem->icon = 'fa fa-sliders';
 }
);
 LayoutData::addSubMenuItem('spec-cate-group', route('group-index'), 'Nhóm thông số kỹ thuật', 'spec-cate', 'primary', function(LayoutMenuItem $menuItem) {
 $menuItem->icon = 'fa fa-sliders';
 }
);
 LayoutData::addSubMenuItem('spec-cate-value', route('value-index'), 'Giá trị thông số', 'spec-cate', 'primary', function(LayoutMenuItem $menuItem) {
 $menuItem->icon = 'fa fa-sliders';
 }
);
 }
 public function middleware(string $routeName, $auth) {
 }
 }
