public function getPagesAsOptions()
    {
        $pages = [];
        $publishedPages = $this->repo->all();

        foreach ($publishedPages as $page) {
            $pages[$page->title] = $page->id;
        }

        return $pages;
    }
public function getPagesAsOptions()
    {
        $pages = [];
        $publishedPages = $this->repo->all();

        foreach ($publishedPages as $page) {
            $pages[$page->title] = $page->id;
        }

        return $pages;
    }
public function getPagesAsOptions ( ) { $ pages = [ ] ; $ publishedPages = $ this -> repo -> all ( ) ; foreach ( $ publishedPages as $ page ) { $ pages [ $ page -> title ] = $ page -> id ; } return $ pages ; }
Get pages as options

@return array
Get pages as options