<?php
use Qii\Base\Route;

Route::prefix("/admin")->setMiddleware(['\middleware\admin'])->group(function($route){
    $route->get("/user/login", function(){return "admin";});
    $route->get('/book/info', function(){return 'book/info';});
    $route->get('/chapter/edit', ['admin\chapter\edit', 'index']);
    $route->put('/chapter/add', 'admin\chapter\add');
});