public function getThemes() { if (isset($_GET['repo'])) { try { $theme = $this->themes->pusherThemeFromRepository($_GET['repo']); return $this->render('themes/edit', compact('theme')); } catch (ThemeNotFound $e) { // Theme not found, show index instead } } $data['themes'] = $this->themes->allPusherThemes(); return $this->render('themes/index', $data); }