예제 #1
0
 protected function init($slug)
 {
     $this->plugin = Plugin::where('slug', $slug)->first();
     if ($this->plugin == null) {
         return false;
     }
     return true;
 }
예제 #2
0
 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;
 }
예제 #3
0
 public function doUninstalPlugin($id)
 {
     $plugin = Plugin::find($id);
     $this->deletePlugin($plugin->slug);
     $plugin->delete();
     return redirect()->route('ct_admin_plugins');
 }