orderBy('position')->whereHas('category', function($query){ $query->where('status', 1); })->get(); } public function productSectionItems(){ return Cache::rememberForever('productSectionItems', function(){ return HeaderProductPanel::with('product.seller','product.product','product.skus')->orderBy('position')->whereHas('product', function($query){ $query->where('status', 1)->whereHas('product', function($query){ $query->where('status', 1); })->activeSeller(); })->get(); }); } public function newUserZonePanel(){ return HeaderNewUserZonePanel::with('newUserZone')->first(); } public function sliderSectionItems(){ return HeaderSliderPanel::orderBy('position')->get(); } public function sliders(){ return HeaderSliderPanel::with(['category'])->where('status', 1)->orderBy('position')->get(); } }