route.php 1.4 KB

1234567891011121314151617181920212223242526272829
  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. $router->group(function () use ($router) {
  13. // device路由
  14. $router->resource('device', '\catchAdmin\device\controller\Device');
  15. // station路由
  16. $router->resource('station', '\catchAdmin\device\controller\Station');
  17. // station_photo路由
  18. $router->resource('station_photo', '\catchAdmin\device\controller\StationPhoto');
  19. //导出设备
  20. $router->post('device/export_device','\catchAdmin\device\controller\Device@export_device');
  21. //导出基站
  22. $router->post('station/export_station','\catchAdmin\device\controller\Station@export_station');
  23. //导入设备
  24. $router->post('import_device', '\catchAdmin\device\controller\Device@import_device');
  25. //导入基站
  26. $router->post('import_station', '\catchAdmin\device\controller\Station@import_station');
  27. })->middleware('auth');