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

use think\Route;

Route::resource(':version/user','api/:version.User');   //注册一个资源路由，对应restful各个方法
Route::resource(':version/Classification','api/:version.Classification');   //注册一个资源路由，对应restful各个方法
Route::resource(':version/Dkcase','api/:version.Dkcase');   //注册一个资源路由，对应restful各个方法
Route::resource(':version/Viewpoint','api/:version.Viewpoint');   //注册一个资源路由，对应restful各个方法
Route::resource(':version/Customized','api/:version.Customized');   //注册一个资源路由，对应restful各个方法
Route::resource(':version/Dankalinfo','api/:version.Dankalinfo');   //注册一个资源路由，对应restful各个方法
Route::resource(':version/Token','api/:version.Token');   //注册一个资源路由，对应restful各个方法

Route::rule(':version/user/:id/fans','api/:version.User/fans'); //restful方法中另外一个方法等。。。
Route::rule(':version/Classification/:id/case_list','api/:version.Classification/case_list'); //restful方法中另外一个方法等。。。
Route::rule(':version/Classification/:id/case_details','api/:version.Classification/case_details'); //restful方法中另外一个方法等。。。
Route::rule(':version/Viewpoint/:id/details','api/:version.Viewpoint/details'); //restful方法中另外一个方法等。。。
Route::rule(':version/token/wechat','api/:version.Token/wechat');
Route::rule(':version/token/mobile','api/:version.Token/mobile');
Route::miss('Error/index');

//if (is_file($_SERVER["DOCUMENT_ROOT"] . $_SERVER["REQUEST_URI"])) {
//    return false;
//} else {
//    require __DIR__ . "/admin/index.php";
//}

return [
    '__pattern__' => [
        'name' => '\w+',
    ],


];
