/** * Show the form for editing the specified outlet. * * @param int $id * @return Response */ public function edit($outlet) { $countries = Country::lists('country', 'id'); $cities = City::where('country_id', Country::DEFAULT_COUNTRY)->lists('city', 'id'); $retailers = Retailer::owner()->lists('name', 'id'); $addresses = Address::select(array('addresses.id', 'addresses.address'))->lists('address', 'id'); $images = Picture::getByRefId($outlet->id, 'outlet'); if ($outlet->status == 'active') { $title = Lang::get('site/outlets/title.outlet_update'); } else { $title = Lang::get('site/outlets/title.create_a_new_outlet'); } return View::make('site.outlets.edit', compact('countries', 'cities', 'outlet', 'title', 'retailers', 'addresses'))->nest('imageForm', 'site.partials.image.create', ['refId' => $outlet->id, 'type' => 'outlet', 'images' => $images]); }
/** * Show the form for editing the specified service. * * @param int $id * @return Response */ public function editService($service) { if ($service->status == 'active') { $title = Lang::get('site/services/title.service_update'); } else { $title = Lang::get('site/services/title.create_a_new_service'); } $outlets = Outlet::active()->owner()->lists('name', 'id'); $images = Picture::getByRefId($service->id, 'service'); return View::make('site.services.edit', compact('service', 'outlets', 'title'))->nest('imageForm', 'site.partials.image.create', ['refId' => $service->id, 'type' => 'service', 'images' => $images]); }
/** * Show the form for editing the specified outlet. * * @param int $id * @return Response */ public function editService($service) { $title = 'Edit Service'; $outlets = Outlet::lists('name', 'id'); $images = Picture::getByRefId($service->id, 'service'); return View::make('admin.services.edit', compact('service', 'outlets', 'title'))->nest('imageForm', 'site.partials.image.create', ['refId' => $service->id, 'type' => 'service', 'images' => $images]); // return View::make('admin.services.edit', compact('service', 'title', 'outlets' )); }
/** * Get edit user's profile * @param $username * @return mixed */ public function getEdit($username) { $userModel = new User(); $user = $userModel->getUserByUsername($username); $countries = Country::lists('country', 'id'); $cities = City::where('country_id', Country::DEFAULT_COUNTRY)->lists('city', 'id'); // Check if the user exists if (is_null($user)) { return App::abort(404); } $images = Picture::getByRefId($user->id, 'user'); return View::make('site/user/edit', compact('user', 'countries', 'cities'))->nest('imageForm', 'site.partials.image.create', ['refId' => $user->id, 'type' => 'user', 'images' => $images]); }