admin.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. use Illuminate\Support\Facades\Route;
  3. Route::group(['domain' => env('APP_HOST'), 'prefix' => 'admin'],function($router){
  4. // 后台首页
  5. $router->get('index','IndexController@index')->name('admin.index');
  6. // 测试数据抓取
  7. $router->post('ajaxIndex','IndexController@index')->name('admin.ajaxIndex');
  8. // 后台同一修改yesOrNo接口路由定义
  9. $router->post('switch','IndexController@switchYesOrNo')->name('admin.switch');
  10. // 修改排序字段
  11. $router->post('update_sort','IndexController@updateSort')->name('admin.u_sort');
  12. // 删除一行数据
  13. $router->post('destroy/{id}','IndexController@destroy')->name('admin.destroy');
  14. // 删除多行数据admin/login
  15. $router->post('destroys','IndexController@destroyIds')->name('admin.destroys');
  16. // 单图上传
  17. $router->post('oneImage','IndexController@oneUpdateImage')->name('admin.oneImage');
  18. $router->post('file','IndexController@fileApkOrIos')->name('admin.file');
  19. // 密码修改
  20. $router->get('password/admin', 'IndexController@authPassword')->name('admin.auth.password');
  21. $router->post('password/admin', 'IndexController@save')->name('admin.auth.password.save');
  22. Route::get('not/permission', function(){
  23. return view('admins.admins.permission');
  24. })->name('admin.not.permission');
  25. $router->post('index/ajax','IndexController@appAjax')->name('admin.index.ajax');
  26. Route::match(['get', 'post'],'city','IndexController@getCity')->name('admin.index.city');
  27. Route::match(['get', 'post'],'sendCode','IndexController@sendCode')->name('admin.send_code');
  28. });