| ID | Username | Firstname | Lastname |
|---|
$dt->addfilter(filed_name,'text',label,operator);
operator takes the following values: =
<
>
>=
<=
!=
like
For example:
$dt = new Your/Datatable/Class(
array(
'firstname' => 'Firstname',
'lastname' => 'Lastname'
));
$dt->addfilter('username','text','Username','like');
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:
filed_name passed in "addfilter" must be declared in the select statement of your datatable class.
By: Mohammad Alaa Aldeen
Git: https://github.com/mhdalaaaldeen