Aside from doing indexes, and use join() instead of with(). This example uses the DataTables library.



<link rel="stylesheet" href="https://cdn.datatables.net/2.3.7/css/dataTables.dataTables.css" />
<script src="https://cdn.datatables.net/2.3.7/js/dataTables.js"></script>









1. Route





Route::post('/data',...