/** * Get all leaflet maps. * * @return array */ public function getMaps() { $collection = MapModel::findAll(); return OptionsBuilder::fromCollection($collection, 'id', 'title')->getOptions(); }