コード例 #1
0
ファイル: UserController.php プロジェクト: adeard/sayourshop
 public function address_content(Request $request)
 {
     $usermeta = UserMeta::where('user_id', Sentinel::getUser()->id)->where('meta_key', 'address')->first();
     $address = unserialize($usermeta->meta_value);
     $this->data['address'] = $address[$request->id];
     $this->data['province'] = Province::where('id', $this->data['address']['provinsi'])->first();
     $this->data['district'] = District::where('id', $this->data['address']['kecamatan'])->first();
     $this->data['city'] = City::where('id', $this->data['address']['kota'])->first();
     $this->data['weight'] = $request->weight;
     $costs = app('App\\Http\\Controllers\\OrderController')->get_cost($this->data['address']['kota']);
     $cost = json_decode($costs);
     $this->data['cost_data'] = serialize($cost->rajaongkir->results[0]->costs);
     return view('address_content')->with('data', $this->data);
 }
コード例 #2
0
ファイル: Offer_air.php プロジェクト: fcolella/docker
 /**
  * Get the city associated with this Air Offer.
  */
 public function city($city_code)
 {
     return City::where('code', $city_code)->get();
 }
コード例 #3
0
ファイル: OrderController.php プロジェクト: adeard/sayourshop
 public function city_content(Request $request)
 {
     $this->data['city_data'] = City::where('id_province', $request->id)->get();
     return view('city_content')->with('data', $this->data);
 }