/** * Bootstrap any application services. * * @return void */ public function boot() { // view()->composer('general.nav', function ($view) { $view->with('all_stores', Store::ordered()->get())->with('all_categories', Constants::availableCategories()); }); view()->composer('general.footer', function ($view) { $view->with('all_categories', Constants::availableCategories()); }); view()->composer('general.featured_offers', function ($view) { $view->with('featured_offers', Offer::featuredOffers()); }); view()->composer('general.featured_stores', function ($view) { $view->with('featured_stores', Store::featured()); }); }
/** * Show the form for editing the specified resource. * * @param int $id * @return Response */ public function edit($id) { $category = Category::find($id); return view('admin.categories.edit')->with('stores', Store::ordered()->get())->with('current_store', $category->getStore())->with('all_categories', Constants::availableCategories())->with('category', $category); }