public function getAvailableItems() { $shopItem = ShopItem::where('shop_id', $this->id)->where('status', 1)->with('item')->get(); $arr = array(); foreach ($shopItem as $st) { array_push($arr, $st->item); } return $arr; }