description = "Last Post From Every Category" [blogPosts lastPosts] pageNumber = "{{ :page }}" postsPerPage = 10 noPostsMessage = "No posts found" sortOrder = "published_at desc" categoryPage = "blog/blog-category" postPage = "blog/blog-post" [blogCategories] slug = "{{ :slug }}" displayEmpty = 0 categoryPage = "blog/blog-category" [viewBag] == get(); foreach ($categories as $key=>$category){ if($category->slug != 'uncategorized'){ $first = \Rainlab\Blog\Models\Category::with('posts')->where('id',$category->id)->first(); $data[] = $first->posts[0]; } } $this['posts'] = $data; } ?> ==