/** * @test */ public function a_page_can_be_retrieved_from_the_content_repository() { $contentRepo = new ContentRepository(); $contentRepo::makePage('home'); $contentRepo::makePage('about'); $page = $contentRepo->getPageByName('home'); $this->assertEquals('home', $page->name); }
public function about() { $aboutPage = $this->contentRepository->getPageByName('about us'); $members = TeamMember::ordered()->get(); return view('front.pages.about')->with(compact('aboutPage', 'members')); }
protected function getHomePage() { return $this->contentRepository->getPageByName('home page'); }