@sodasix 在返回的json,object指向的是空数组。
$obj = new Object;
$obj->object_id = $objectId;
$obj->object_lt_x = $objX;
$obj->object_lt_y = $objY;
$obj->object_width = $objWidth;
$obj->object_height = $objHeight;
$obj->image_id = $imageId;
$obj->type_id = $typeId;
if ($obj->save()) {
$obj_id = $obj->object_id;
$object = DB::table('objects')->where('object_id',$objectId)->get();
$success = array('status' => 1,'message' => $type_name.'标记成功!','obj_id' => $obj_id,'object' => $object);
return response()->json($success);
} else {
$error = array('status' => 0,'message' => $type_name.'标记失败!');
return response()->json($error);
}