public function adminPage() { if ($this->auth('admin_plugins')) { $plugins = Plugin::all(); return $this->moduleRender('list', 'Plugins', ['plugins' => $plugins], 'cmstwoPluggable'); } else { return redirect()->back(); } }
private function getPluginRoutes() { $plugins = Plugin::all(); $results = []; foreach ($plugins as $plugin) { $routes = json_decode($plugin->routes); if (isset($routes->admin)) { foreach ($routes->admin as $title => $route) { $results[$title] = $route; } } } return $results; }