protected function listPosts() { $posts = NewsPost::listFrontEnd(['page' => $this->property('pageNumber'), 'sort' => $this->property('sortOrder'), 'perPage' => $this->property('postsPerPage')]); return $posts; }
protected function loadPost() { $slug = $this->property('slug'); $post = NewsPost::isPublished()->where('slug', $slug)->first(); return $post; }