Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save worstn8mare/966d6dc9f3d62c5a5416c280abab89c8 to your computer and use it in GitHub Desktop.

Select an option

Save worstn8mare/966d6dc9f3d62c5a5416c280abab89c8 to your computer and use it in GitHub Desktop.
public function places(){
$user_id = Session::get('user');
$partnerstab = User::where('partner_id',$user_id)->with('m1p','m1s')->first();
$payment = PaymentTerm::where('status', 'Active')->orderby('id')->get();
$password = DB::table('users')->where('partner_id',$user_id)->first();
$user = User::where('partner_id',$user_id)->first();
if(Input::get('code')){
if(Input::get('reftype') == "province"){
$province = Province::where('cCode', Input::get('code'))->paginate(10);
if(Request::ajax()){
return view('deskpad.systemproperties.places_paging_province',compact('payment','partnerstab','user','province','password'));
}
return view('deskpad.systemproperties.places_paging_province',compact('payment','partnerstab','user','province','password'));
}
else if(Input::get('reftype') == "city"){
// sa city ni dinhi
}
}
else{
$country = Country::where('status', 'Active')->paginate(10);
if(Request::ajax()){
return view('deskpad/systemproperties/places_paging_country', compact('payment','partnerstab','user','country','password'));
}
return view('deskpad/systemproperties/places', compact('payment','partnerstab','user','country','password'));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment