routes.php
Route::post('infoclass/up/{id}', 'InfoclassController@up');<br></br>
Controller
public function up(Request $id,$parentid,$orderid) { echo json_encode(array("status"=>"y","info"=>"排序提升成功")); }<br></br>
js文件
function Promote(title,id,parentid,orderid) { var title = title; var id = id; var parentid = parentid; var orderid = orderid; $.ajax({ type: "POST", dataType: "json", cache: false, url: title+'/up', data: { id: id, parentid: parentid, orderid: orderid, _method:"POST" }, success: function(data) { if(data.status == 'y'){ layer.msg(data.info, {icon: 1}); location.reload(); }else{ layer.msg(data.info, {icon: 2}); } } }) } <br></br>
错误:
感觉是路由没有设置好么 - -,想问下哪里出问题了。