/** * Passes the required variables to the sidebar */ public function ComposeWebPanelSidebar() { view()->composer('templates.' . \Config::get('webpanel.template') . 'webpanel.includes.sidebar', function ($view) { $view->with('storeItemCount', StoreItem::all()->count()); $view->with('storeCategoryCount', StoreCategory::all()->count()); $view->with('storeUserCount', StoreUser::all()->count()); $view->with('storeServerCount', StoreServer::all()->count()); $view->with('panelUserCount', User::all()->count()); $view->with('panelRoleCount', Role::all()->count()); $view->with('panelPermissionCount', Permission::all()->count()); }); }
/** * Display a listing of the resource. * * @return Response */ public function index() { $servers = StoreServer::all(); return view('templates.' . \Config::get('webpanel.template') . 'webpanel.store.servers.index', compact('servers')); }