$dt = new Your/Datatable/Class( array( 'firstname' => 'Firstname', 'lastname' => 'Lastname' ), //Columns whose use custom render array( 'column _name'=>'static function pesent in datatable class' 'firstname'=>'function_name_for_firstname_field' ) ); return $dt->display('Your/Blade/Template',$request);
static function function_name_for_firstname_field($r) { return <a href=""> $r->firstname </a> ; }
@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