route.php 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?php
  2. $router->group(function () use ($router) {
  3. // 登录日志
  4. $router->get('log/login', '\catchAdmin\system\controller\LoginLog@list');
  5. $router->delete('log/login/<id>', '\catchAdmin\system\controller\LoginLog@empty');
  6. // 操作日志
  7. $router->get('log/operate', '\catchAdmin\system\controller\OperateLog@list');
  8. // $router->delete('empty/log/operate', '\catchAdmin\system\controller\OperateLog@empty');
  9. $router->delete('log/operate/<id>', '\catchAdmin\system\controller\OperateLog@delete');
  10. // 数据字典
  11. $router->get('tables', '\catchAdmin\system\controller\DataDictionary@tables');
  12. $router->get('table/view/<table>', '\catchAdmin\system\controller\DataDictionary@view');
  13. $router->post('table/optimize', '\catchAdmin\system\controller\DataDictionary@optimize');
  14. $router->post('table/backup', '\catchAdmin\system\controller\DataDictionary@backup');
  15. // 附件
  16. $router->resource('attachments', '\catchAdmin\system\controller\Attachments');
  17. // 配置
  18. $router->get('config/parent', '\catchAdmin\system\controller\Config@parent');
  19. $router->resource('config', '\catchAdmin\system\controller\Config');
  20. // 代码生成
  21. $router->post('generate', '\catchAdmin\system\controller\Generate@save');
  22. $router->post('generate/preview', '\catchAdmin\system\controller\Generate@preview'); // 预览
  23. $router->post('generate/create/module', '\catchAdmin\system\controller\Generate@createModule'); // 创建模块
  24. // 敏感词
  25. $router->resource('sensitive/word', '\catchAdmin\system\controller\SensitiveWord');
  26. //developer路由
  27. $router->resource('developer', '\catchAdmin\system\controller\Developer')->middleware('auth');
  28. // 开发者认证
  29. $router->post('developer/authenticate', '\catchAdmin\system\controller\Developer@authenticate');
  30. // 模块管理
  31. $router->get('modules', '\catchAdmin\system\controller\Module@index');
  32. $router->put('modules/<module>', '\catchAdmin\system\controller\Module@disOrEnable');
  33. $router->put('cache/modules', '\catchAdmin\system\controller\Module@cache');
  34. $router->delete('clear/modules', '\catchAdmin\system\controller\Module@clear');
  35. })->middleware('auth');
  36. // 上传
  37. $router->group('upload', function () use ($router) {
  38. $router->post('image', '\catchAdmin\system\controller\Upload@image');
  39. $router->post('file', '\catchAdmin\system\controller\Upload@file');
  40. $router->post('file_v2', '\catchAdmin\system\controller\Upload@file_v2');
  41. $router->post('unlinkFile', '\catchAdmin\system\controller\Upload@unlinkFile');
  42. $router->post('file_excel', '\catchAdmin\system\controller\Upload@file_excel');
  43. $router->get('osspolicy', '\catchAdmin\system\controller\Upload@getAliOssPolicy');
  44. $router->post('osscallback', '\catchAdmin\system\controller\Upload@aliOssCallback');
  45. });
  46. // sysDictType路由
  47. $router->group('sysDictType', function () use ($router) {
  48. $router->resource('/', '\catchAdmin\system\controller\SysDictType');
  49. });
  50. // sysDictData路由
  51. $router->group('sysDictData', function () use ($router) {
  52. $router->resource('/', '\catchAdmin\system\controller\SysDictData');
  53. $router->post('getOptions', '\catchAdmin\system\controller\SysDictData@getOptionsByCode');
  54. });