public function getProvince($id) { $province = Provinces::where('country_id', '=', $id)->get(); $html = '<option></option>'; foreach ($province as $p) { $html .= "<option value='" . $p->id . "'>" . $p->name . "</option>"; } echo $html; }
public function getIndex() { $hotel = Hotel::find(1); $regions = Regions::all(); $country = Countries::where('region_id', '=', $hotel->city->province->country->region->id)->get(); $province = Provinces::where('country_id', '=', $hotel->city->province->country->id)->get(); $city = Cities::where('province_id', '=', $hotel->city->province->id)->get(); $options = array('hotel' => $hotel, 'regions' => $regions, 'country' => $country, 'province' => $province, 'city' => $city); return View::make('home/dashboard', array())->nest('content', 'hotel/profile', $options); }