<?php
 namespace VnChocola\Module\SuperAdmin;
 use TCMS\Module;
 use Route;
 use Model;
 use LayoutData;
 class SpAdminRole extends Module {
 protected function initialize() {
 }
 protected function registerRoutes() {
 Route::get('/roles', 'IndexController', 'index')->name('index');
 Route::get('/roles/create', 'IndexController', 'create')->name('create');
 Route::post('/roles/create', 'IndexController', 'postCreate')->name('postCreate');
 Route::get('/roles/update/{id}', 'IndexController', 'update')->name('update');
 Route::post('/roles/update/{id}', 'IndexController', 'postUpdate')->name('update');
 Route::post('/roles/delete/{id}', 'IndexController', 'postDelete')->name('delete');
 }
 public function registerComponent() {
 Model::add('RolesModel', \VnChocola\Model\RolesModel::class, true);
 }
 public function boot() {
 LayoutData::addMenuItem('role', route('index'), 'Quyền', 'primary', function(\LayoutMenuItem $menuItem) {
 $menuItem->icon = 'fa fa-gavel';
 }
);
 }
 public function middleware(string $routeName, $auth) {
 }
 }
