Sort onlineshop catalog

Hello, I have this code:

$("#sort").change(function(){

  		var sort = $(this).val();

  		alert(sort);

  		$.get('/catalogsort', {
  				sort:sort
			});			
  	});	

It called this controller and return something. Yet, I do not see the new catalog result being return in the blade (I am using laravel), any idea why? I have do .done in the js after .get, is it okay?

 public function catalogsort(Request $request)
    {

     ....
 
     return view('store.catalog', compact('prod', 'cat', 'user', 'totalcarts'));
    }

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.