It appears you're using JQuery Datatables.
I recommend you use a Laravel package like yajra/laravel-datatables. The documentation is clear and the package easy to implement.
Regards.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi, I am using laravel 5.4 and bootstrap 3 , I want use pagination and search . but I the pagination and search not working well. Here is my script code: $(document).ready(function() { $('#example').DataTable({ "searching": true, "paging": true, }); });
and HTML Code:
@section('content')
<h1> All Information</h1>
<table id="example" class="table table-striped table-bordered" style="width:100%">
<thead>
<tr>
<th>First Name</th>
<th>Username(Student Id)</th>
<th>College</th>
<th>Year Of Graduatuion</th>
<th>Job Title</th>
<th>Job Organization</th>
<th>Job Province</th>
</tr>
</thead>
@if(isset($jobs))
@foreach($jobs as $job)
<tbody>
<tr>
<td>{{$job->user->first_name}}</td>
<td>{{$job->user->username}}</td>
<td>{{$job->user->college->college_name}}</td>
<td>{{$job->user->graduated_year}}</td>
<td>{{$job->job_title}}</td>
<td>{{$job->organization->name}}</td>
<td>{{$job->job_province}}</td>
</tr>
</tbody>
@endforeach
@endif
</table>
and Controller: public function index() { $jobs = Job::all(); return view('admin.jobs-information.index', compact('jobs')); }
Please or to participate in this conversation.