According to Datatable Jquery website,
There are times when reading data from the DOM is simply too slow or unwieldy, particularly when dealing with many thousands or millions of data rows. To address this DataTables' server-side processing feature provides a method to let all the "heavy lifting" be done by a database engine on the server-side (they are after all highly optimised for exactly this use case!), and then have that information drawn in the user's web-browser. Consequently, you can display tables consisting of millions of rows with ease. When using server-side processing, DataTables will make an Ajax request to the server for each draw of the information on the page (i.e. when paging, ordering, searching, etc.). DataTables will send a number of variables to the server to allow it to perform the required processing and then return the data in the format required by DataTables.
DEMO 👉 Online
git clone https://github.com/jhonijlm/laravel-datatable-jquery-server-side.git
composer install
cp .env.example .env
php artisan key:generate
-- Create datatabase and config in .env
php artisan config:cache
php artisan migrate
php artisan db:seed
php artisan serve