admin.php 363 B

123456789
  1. <?php
  2. use Qii\Base\Route;
  3. Route::prefix("/admin")->setMiddleware(['\middleware\admin'])->group(function($route){
  4. $route->get("/user/login", function(){return "admin";});
  5. $route->get('/book/info', function(){return 'book/info';});
  6. $route->get('/chapter/edit', ['admin\chapter\edit', 'index']);
  7. $route->put('/chapter/add', 'admin\chapter\add');
  8. });