if($listing != null) {
return \Response::json($listing);//return propertyees matching the search parameters
} else {
return \Response::json(array(["message"=>"Sorry no properties found matching your search criteria. Please try again."]),200);
}
在json中返回视图
答案 0 :(得分:0)
if($listing != null) {
return response()->json(['result' => $listing]);//return propertyees matching the search parameters
}else {
return response()->json((["message"=>"Sorry no properties found matching your search criteria. Please try again."]),200);
}
答案 1 :(得分:0)
if($listing != null) {
return response()->json($listing);
}