public function getName($id) { $team = Members::where('user_id', '=', $id)->get(); foreach ($team as $teams) { return $teams->name; } }
public function getAdress($id) { $team = Members::where('user_id', '=', $id)->get(); foreach ($team as $teams) { return $teams->address; } }
public function postEdit($id) { $staff_id = Request::segment(5); $fields = array('email' => Input::get('email'), 'name' => Input::get('name'), 'phone' => Input::get('phone'), 'cell' => Input::get('cell'), 'fax' => Input::get('fax'), 'address' => Input::get('address'), 'zip' => Input::get('zip'), 'country' => Input::get('country'), 'listing_quota' => Input::get('listing_quota'), 'hot_quota' => Input::get('hot_quota')); Agency::where('agency_id', '=', $id)->update($fields); $fields1 = array('email' => Input::get('email')); DB::table('users')->where('id', '=', $staff_id)->update($fields1); $fieldsreg = array('name' => Input::get('name'), 'phone' => Input::get('phone'), 'cell' => Input::get('cell'), 'fax' => Input::get('fax'), 'address' => Input::get('address'), 'zip' => Input::get('zip'), 'country' => Input::get('country')); Members::where('user_id', '=', $staff_id)->update($fieldsreg); $proimg = Input::file('photo'); if ($proimg) { $fieldsimg = array('photo' => $this->ImageCrop('photo', 'photos', '200', '200', '')); DB::table('registration')->where('user_id', '=', $staff_id)->update($fieldsimg); } return Redirect::to('dashboard/agencies'); }
public function getSendmessage($id) { $records = Members::where('user_id', $id)->get(); return View::make('auth.sendmessage')->with('records', $records); }