Datatable icon indicating copy to clipboard operation
Datatable copied to clipboard

don't understand Extras (TableTools)?

Open thearabbit opened this issue 11 years ago • 0 comments

I try add table tools on existing view list, but it don't show any tools.


// In controller
    public function index()
    {
        $data['datatable'] = \Datatable::table()
            ->addColumn('Full Name', 'Email', 'Type', 'Active', 'User Name', 'Owner', 'Action')
            ->setUrl(route('cpanel.api.user'))
            ->setOptions(array(
                'dom' => "T<'clear'>lfrtip",
                'tabletools' => array(
                    "aSwfPath" => "your/path/to/swf/copy_csv_cls_pdf.swf",
                    "aButtons" => array("copy", "pdf", "xls")
                )
            ))
            ->render();

        return \View::make('cpanel::user.index', $data);
    }

// In view
@extends(Config::get('cpanel::layout'))

@section('content')

<?php
echo $datatable;
?>

@stop

should i add any plugin or library for this option? Please example for me. Thanks...

thearabbit avatar Sep 26 '14 01:09 thearabbit