private function leftMenuCounts() { view()->composer('dashboard._partials.left.menu_bar', function ($view) { $view->with('usersCount', User::count()); $view->with('categoriesCount', Category::count()); $view->with('venuesCount', Venue::count()); $view->with('spacesCount', Space::count()); $view->with('amenitiesCount', Tag::where('type', 'amenity')->count()); }); }
/** * Show the form for editing the specified resource. * * @param int $id * * @return \Illuminate\Http\Response */ public function edit($id) { $space = Space::where('id', $id); return view('dashboard.spaces.edit', compact('space')); }