public function onStart() { $feature = $this['feature'] = Rainlab\Blog\Models\Post::orderBy('id', 'desc')->first(); $this['blogPosts'] = Rainlab\Blog\Models\Post::where('id', '<>', $feature->id)->orderBy('id', 'desc')->paginate(4); }
public function onEnd() { $this['blog'] = Rainlab\Blog\Models\Post::find($this['post']->id); $this['artikel'] = Rainlab\Blog\Models\Post::where('id', '<>', $this['post']->id)->get(); $this->page->title = $this['post']->title; }