env('APP_HOST'), 'prefix' => 'admin'],function($router){ // 后台首页 $router->get('index','IndexController@index')->name('admin.index'); // 测试数据抓取 $router->post('ajaxIndex','IndexController@index')->name('admin.ajaxIndex'); // 后台同一修改yesOrNo接口路由定义 $router->post('switch','IndexController@switchYesOrNo')->name('admin.switch'); // 修改排序字段 $router->post('update_sort','IndexController@updateSort')->name('admin.u_sort'); // 删除一行数据 $router->post('destroy/{id}','IndexController@destroy')->name('admin.destroy'); // 删除多行数据admin/login $router->post('destroys','IndexController@destroyIds')->name('admin.destroys'); // 单图上传 $router->post('oneImage','IndexController@oneUpdateImage')->name('admin.oneImage'); $router->post('file','IndexController@fileApkOrIos')->name('admin.file'); // 密码修改 $router->get('password/admin', 'IndexController@authPassword')->name('admin.auth.password'); $router->post('password/admin', 'IndexController@save')->name('admin.auth.password.save'); Route::get('not/permission', function(){ return view('admins.admins.permission'); })->name('admin.not.permission'); $router->post('index/ajax','IndexController@appAjax')->name('admin.index.ajax'); Route::match(['get', 'post'],'city','IndexController@getCity')->name('admin.index.city'); Route::match(['get', 'post'],'sendCode','IndexController@sendCode')->name('admin.send_code'); });