| |

PHP Advanced Datatable in Laravel >= 5.0



in the action of your controller put the following code:

    $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
        

Note:

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