<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\facade\Route;

Route::rule('/', 'Index/index');
Route::rule('test', 'Index/test');

Route::group('/admin', function(){
	Route::rule('auth/user/:action', 'admin.auth.User/:action');
	Route::rule('auth/department/:action', 'admin.auth.Department/:action');
	Route::rule('auth/role/:action', 'admin.auth.Role/:action');
	Route::rule('system/:controller/:action', 'admin.system.:controller/:action');
	Route::rule('student/:controller/:action', 'admin.student.:controller/:action');
	Route::rule('exam/:controller/:action', 'admin.exam.:controller/:action');
	Route::rule('point/:controller/:action', 'admin.point.:controller/:action');
	Route::rule('operate/:controller/:action', 'admin.operate.:controller/:action');
})->middleware(['Api', 'Auth']);

Route::group('admin/auth', function(){
	Route::post('login', 'admin.auth.Index/login');
})->middleware(['Api']);

Route::miss('index/miss');