Posted by Arjun Arjun on Wednesday 8th May 2019, 1 minute read

How to use Datatables in Laravel 5.8

How to Laravel 5.8

In this tutorial, I will show you how to use the Datatables in the Laravel based project withyajra/laravel-datatables-oracle package. For this tutorial, we gonna use Laravel 5.8 version but the Datatable package usage steps will be pretty simpler with other versions of Laravel framework.

As a first step lets setup a brand new Laravel project with below composer command.

composer create-project --prefer-dist laravel/laravel datatablesExample

Above command will create a Laravel project with in a folder called datatablesExample

After creating the project, we need to install yajra/laravel-datatables-oracle composer package with below shown composer command. This package is created to handle server-side works of DataTables jQuery Plugin via AJAX option by using Eloquent ORM, Fluent Query Builder or Collection.

composer require yajra/laravel-datatables-oracle

Now register provider and facade in the application, to do that open your
config/app.php file and add the following lines to the providers and aliases array as shown below.

'providers' => [
'aliases' => [
	'DataTables' => Yajra\DataTables\Facades\DataTables::class,


I am Arjun from Hyderabad (India). I have been working as a software engineer from the last 7+ years, and it is my passion to learn new things and implement them as a practice. Aside from work, I like gardening and spending time with pets.