app/DataTables/UsersDataTable.php
/**
     * Optional method if you want to use html builder.
     *
     * @return \Yajra\DataTables\Html\Builder
     */
Optional method if you want to use html builder.
Optional method if you want to use html builder .
public function html()
    {
        return $this->builder()
            ->columns($this->getColumns())
            ->minifiedAjax()
            ->parameters([
                'dom'        => 'Bfrtip',
                'lengthMenu' => [[10, 25, 50, 100, -1], [10, 25, 50,100, trans('site.all_record')]],
                'destroy'=> true,
                'buttons'      => [
                    [
                        'text'      => '<i class="fa fa-plus" style="font-size:18px;color:green"> </i> ' . __('site.add'),
                        'action'    => 'function(){
                            window.location.href = "' . \URL::current() . '/create";
                        }'
                    ],
                    ['extend' => 'print',  'exportOptions'=>['columns'=>':visible'] ,'text' => '<i class="fa fa-print" style="font-size:18px;color:blue"></i>'],
                    ['extend' => 'colvis' ,'text'      => '<i class="fa fa-eye-slash" style="font-size:18px;color:red"></i>'. __('site.ex_colvis')],
                    ['extend' => 'pageLength' ],
                    ['extend' => 'csv', 'exportOptions'=>['columns'=>':visible'] ,'className' => 'btn btn-primary ', 'text' => '<i class="fa fa-file" style="font-size:18px;color:#cc5200"></i> ' . trans('site.ex_csv')],
                    ['extend' => 'excel','exportOptions'=>['columns'=>':visible'] , 'className' => 'btn btn-primary ', 'text' => '<i class="fa fa-file-excel-o" style="font-size:18px;color:green"></i> ' . trans('site.ex_excel')],
                    ['extend' => 'pdf','exportOptions'=>['columns'=>':visible'] , 'className' => 'btn btn-primary  ' , 'text' => '<i class="fa fa-file-pdf-o" style="font-size:18px;color:red"></i> ' . trans('site.ex_pdf')],
                    ['extend' => 'copy', 'exportOptions'=>['columns'=>':visible'] ,'className' => 'btn btn-primary ' , 'text' => '<i class="fa fa-copy" style="font-size:18px;color:blue"></i> ' . trans('site.ex_copy')],
                ],
                'initComplete' => " function () {
		            this.api().columns([2,3]).every(function () {
		                var column = this;
		                var input = document.createElement(\"input\");
		                $(input).appendTo($(column.footer()).empty())
		                .on('keyup', function () {
		                    column.search($(this).val(), false, false, true).draw();
		                });
		            });
                }",
                'language'         => datatable_lang(),
            ]);
    }
public function html ( ) { return $ this -> builder ( ) -> columns ( $ this -> getColumns ( ) ) -> minifiedAjax ( ) -> parameters ( [ 'dom' => 'Bfrtip' , 'lengthMenu' => [ [ 10 , 25 , 50 , 100 , - 1 ] , [ 10 , 25 , 50 , 100 , trans ( 'site.all_record' ) ] ] , 'destroy' => true , 'buttons' => [ [ 'text' => '<i class="fa fa-plus" style="font-size:18px;color:green"> </i> ' . __ ( 'site.add' ) , 'action' => 'function(){
                            window.location.href = "' . \ URL :: current ( ) . '/create";
                        }' ] , [ 'extend' => 'print' , 'exportOptions' => [ 'columns' => ':visible' ] , 'text' => '<i class="fa fa-print" style="font-size:18px;color:blue"></i>' ] , [ 'extend' => 'colvis' , 'text' => '<i class="fa fa-eye-slash" style="font-size:18px;color:red"></i>' . __ ( 'site.ex_colvis' ) ] , [ 'extend' => 'pageLength' ] , [ 'extend' => 'csv' , 'exportOptions' => [ 'columns' => ':visible' ] , 'className' => 'btn btn-primary ' , 'text' => '<i class="fa fa-file" style="font-size:18px;color:#cc5200"></i> ' . trans ( 'site.ex_csv' ) ] , [ 'extend' => 'excel' , 'exportOptions' => [ 'columns' => ':visible' ] , 'className' => 'btn btn-primary ' , 'text' => '<i class="fa fa-file-excel-o" style="font-size:18px;color:green"></i> ' . trans ( 'site.ex_excel' ) ] , [ 'extend' => 'pdf' , 'exportOptions' => [ 'columns' => ':visible' ] , 'className' => 'btn btn-primary  ' , 'text' => '<i class="fa fa-file-pdf-o" style="font-size:18px;color:red"></i> ' . trans ( 'site.ex_pdf' ) ] , [ 'extend' => 'copy' , 'exportOptions' => [ 'columns' => ':visible' ] , 'className' => 'btn btn-primary ' , 'text' => '<i class="fa fa-copy" style="font-size:18px;color:blue"></i> ' . trans ( 'site.ex_copy' ) ] , ] , 'initComplete' => "  function () {
		            this.api().columns([2,3]).every(function () {
		                var column = this;
		                var input = document.createElement( \" input \" );
		                $(input).appendTo($(column.footer()).empty())
		                .on('keyup', function () {
		                    column.search($(this).val(), false, false, true).draw();
		                });
		            });
                } " , 'language' => datatable_lang ( ) , ] ) ; }
Optional method if you want to use html builder.
Optional method if you want to use html builder .
//'className' => 'btn btn-info ', //['extend' => 'reload'],