Пример #1
0
 /**
  * Update the specified outlet in storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function update($id)
 {
     $retailer = Retailer::findOrFail($id);
     $validator = Validator::make($data = Input::all(), Retailer::$rules);
     if ($validator->fails()) {
         return Redirect::back()->withErrors($validator)->withInput();
     }
     $retailer->update($data);
     $countries = Country::lists('country', 'id');
     $cities = City::where('country_id', $retailer->country_id)->lists('city', 'id');
     $addresses = Address::where('city_id', $retailer->city_id)->lists('address', 'id');
     $cats = BusinessCategory::lists('name', 'id');
     return Redirect::to('admin/retailers/' . $retailer->id . '/edit')->with('success', 'Update retailer');
 }
Пример #2
0
 public static function getKeyValueData()
 {
     return BusinessCategory::lists('name', 'id');
 }