$dt = new Your/Datatable/Class( //Columns array( 'firstname' => 'Firstname', 'lastname' => 'Lastname' )); return $dt->display('Your/Blade/Template',$request);in your blade template where you want your datatable appears put the following code:
@include('phpdt::datatable_view') @section('datatable_section') @parent @show
Any column is used in creating datatable object as shown above must be present in the query builder.
By: Mohammad Alaa Aldeen
Git: https://github.com/mhdalaaaldeen