public function postCargarprovincia() { if (Request::ajax()) { $array['w'] = ''; if (Input::has('departamento_id')) { $array['w'] = " AND departamento_id=" . Input::get('departamento_id') . " "; } $r = Ubigeo::getCargarProvincia($array); return Response::json(array('rst' => 1, 'datos' => $r)); } }