<?php
 namespace VnChocola\Module\Master;
 use TCMS\Module;
 use Route;
 use Model;
 use LayoutData;
 class MasterLoanCar extends Module {
 protected function initialize() {
 }
 protected function registerRoutes() {
 Route::get('/loan-car', 'IndexController', 'index')->name('index');
 Route::get('/loan-car/create', 'IndexController', 'create')->name('create');
 Route::post('/loan-car/create', 'IndexController', 'postCreate');
 Route::get('/loan-car/update/{id}', 'IndexController', 'update')->name('update');
 Route::post('/loan-car/update/{id}', 'IndexController', 'postUpdate');
 Route::post('/loan-car/delete', 'IndexController', 'postDelete')->name('delete');
 Route::get('/loan-car/status/{id}/{status}', 'IndexController', 'status')->name('status');
 }
 public function registerComponent() {
 Model::add('LoanCarModel', \VnChocola\Model\LoanCarModel::class, true);
 }
 public function boot() {
 LayoutData::addMenuItem('loan-car', route('index'), lang('loan_car_model.name'), 'primary', function($menuItem) {
 $menuItem->icon = "fas fa-motorcycle";
 }
);
 }
 public function middleware(string $routeName, $auth) {
 }
 }
