Laravel Multi level relationship in API Resource
问题 My problem is, the api resource loading which i really not needed. Look into my Api Resource files //BoxItemResource.php public function toArray($request) { return [ 'box_id'=> $this->box_id, 'item_id'=> $this->item_id, 'item'=> new ItemResource($this->item) ]; } //ItemResource.php public function toArray($request) { return [ 'id' => $this->id, 'shipping_price' => $this->shipping_price, 'condition_id' => $this->condition_id, 'condition' => new ConditionResource($this->condition) ]; } /