== where("id", "!=", $this->theme->politics_news)->limit(8)->get(); $last_categories = $this['categories']->slice(0, 4)->pluck('id')->toArray(); $this['last_category_posts'] = \Indikator\News\Models\Posts::whereIn('category_id', $last_categories) ->where("locale", App::getLocale()) ->orderBy("published_at", "desc")->limit(4)->get(); } ?> == {{'Последние новости'|_}} {% for item in lastNews %} {{ item.published_at| date("d.m") }} / {{item.category.name}} {{item.title}} {% endfor %} {% for post in last_category_posts %} {% if post.anons %} {% else %} {% if post.thumb_image %} {% else %} {% endif %} {% endif %} {{ post.title }} {{post.category.name}} {% endfor %} {% for item in categories.slice(5,3) %} {{item.name}} {% endfor %} {% set post_banner_link = attribute(this.theme, 'post_banner_link_' ~ activeLocale) %} {% set post_banner = attribute(this.theme, 'post_banner_' ~ activeLocale) %} {% set weekly = attribute(this.theme, 'weekly_' ~ activeLocale) %}