route.php 1.1 KB

123456789101112131415161718192021222324
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CatchAdmin [Just Like ~ ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2017~{$year} http://catchadmin.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed ( https://github.com/yanwenwu/catch-admin/blob/master/LICENSE.txt )
  8. // +----------------------------------------------------------------------
  9. // | Author: JaguarJack [ njphper@gmail.com ]
  10. // +----------------------------------------------------------------------
  11. // you should use `$router`
  12. use catchAdmin\domain\controller\DomainRecord;
  13. $router->group(function () use ($router){
  14. // 域名管理
  15. $router->get('domain', '\catchAdmin\domain\controller\Domain@index');
  16. $router->get('domain/<name>', '\catchAdmin\domain\controller\Domain@read');
  17. // 域名解析管理
  18. $router->resource('record/domain', DomainRecord::class);
  19. $router->put('record/domain/<id>/<status>', '\catchAdmin\domain\controller\DomainRecord@enable');
  20. })->middleware('auth');