title = "Berkarar" url = "/" layout = "default" is_hidden = 0 == limit(5)->get(); $this['movies'] = Tps\Movies\Models\Movie::orderBy('created_at')->limit(15)->get(); $this['sales'] = Tps\Shops\Models\Sale::orderBy('id', 'desc')->get(); $this['sales_all'] = $this['sales']->slice(0, 6); $this['sales_news'] = $this['sales']->where("type", "news")->slice(0, 6); $this['sales_promo'] = $this['sales']->where("type", "promo")->slice(0, 6); $this['sales_discount'] = $this['sales']->where("type", "discount")->slice(0, 6); $this['shop_categories'] = Tps\Shops\Models\Category::where("top_category_id", $this->theme->main_shops)->orderBy('sort_order')->limit(3)->get(); //dd($this['shop_categories']); $this['shop_category_ids'] = $this['shop_categories']->lists('id'); $this['shop_all'] = Tps\Shops\Models\Shop::whereIn('category_id', $this['shop_category_ids'])->limit(6)->get(); } ?> == {% partial 'home/slider' %} {% partial 'home/sales_home' %} {% partial 'home/movies' %} {% partial 'home/shops' %}