我在error.PHP中有下面的代码,它是在我的控制器中使用App :: abort(404,$error)触发的.我的响应状态代码仍为200(确定).我试过各种错误代码,如400,403
// NotFoundException handler App::error(function(NotFoundException $e) { $default_message = 'The requested resource was not found'; return Response::json(array( 'error' => $e->getMessage() ?: $default_message,),404); });