laravel 4 - How to set the maximum execution time using ajax (get) -


i error "500 internal server error" when retrieve lot of data. when choose country having 10 cities works, when choose country 100 thousands cities error occurs. solution this?

my script

$('#country_id').on('change',function(e){   console.log(e);     var cat_id = e.target.value;     var e = document.getelementbyid("country_id");     var str = e.options[e.selectedindex].value;     document.getelementbyid('txt').value = str;    $.get('/public/countrycity/ajax-sub?cat_id=' + cat_id, function(data){           $('#state').empty();      $.each(data, function(category, subcatobj){       $('#state').append('<option value="'+subcatobj.id+'">'+subcatobj.full_name_nd+'</option>');       });   });  });  $('#state').on('change',function(e){   console.log(e);     var e = document.getelementbyid("state");     var strs = e.options[e.selectedindex].value;     document.getelementbyid('txts').value = strs; }); 

my controller

public function getcountry() {     $countries = country::all();     $cat_id = input::get('cat_id');     $cities = city::where('id', '=', $cat_id)->get();     return view::make('countrycity.countrycity')         ->with('countries',$countries)             ->with('cities',$cities)                 ->with('title', 'ajax'); }  public function getcity() {     $cat_id = input::get('cat_id');      $cities = city::where('cc_fips', '=', $cat_id)->get();     return response::json($cities); } 


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -