Yeah, you can do something like this:
$view = View::make('partial_template')->with('apartments',$apartments)->render(); return array('html' => $view, 'status' => 'OK');
It uses a partial template to render the results.
I am new to Laravel and I am trying to do this:
I have a webpage that list hundreds of apartments, I already did it with pagination in laravel, the thing is I have a filter in the same page in left column, and I want to load again the data according to the filter applied by the user using ajax in the conta.
I realized the response is just sending the data filtered but with no design nor html and I need to list again the information with the same design it was displayed before the filter
return Response::json( $response );
Is there any option to send the response to a view first or a place where I can listed and then return it to the container with style and html.?
I don't know if I was clear please excuse my english.