Property | Type | Description | |
---|---|---|---|
$collection | |||
$config | Illuminate\Contracts\Config\Repository | ||
$form | |||
$html | |||
$url | |||
$view | Illuminate\Contracts\View\Factory |
Property | Type | Description | |
---|---|---|---|
$ajax | string | array | ||
$attributes | array | ||
$tableAttributes | array | ||
$template | string | ||
$validCallbacks | array | Lists of valid DataTables Callbacks. |
Method | Description | |
---|---|---|
__construct ( Illuminate\Contracts\Config\Repository $config, Illuminate\Contracts\View\Factory $view, |
||
add ( Yajra\Datatables\Html\Column $column ) | Add a Column object in collection. | |
addAction ( array $attributes = [] ) | Add a action column. | |
addCheckbox ( array $attributes = [] ) | Add a checkbox column. | |
addColumn ( array $attributes ) | Add a column in collection using attributes. | |
addIndex ( array $attributes = [] ) | Add a index column. | |
ajax ( string | array $attributes ) | Setup ajax parameter | |
columns ( array $columns ) | Set datatables columns from array definition. | |
generateScripts ( ) : string | Get generated raw scripts. | |
getColumns ( ) : |
Get collection of columns. | |
getQualifiedTitle ( string $title ) : string | Convert string into a readable title. | |
getTableAttribute ( string $attribute ) : mixed | Retrieves HTML table attribute value. | |
parameterize ( array $attributes = [] ) : string | Generate DataTables js parameters. | |
parameters ( array $attributes = [] ) | Configure DataTable's parameters. | |
scripts ( null $script = null, array $attributes = ['type' => 'text/javascript'] ) : string | Generate DataTable javascript. | |
setTableAttribute ( string | array $attribute, mixed $value = null ) | Sets HTML table attribute(s). | |
setTableAttributes ( array $attributes ) | Sets multiple HTML table attributes at once. | |
setTemplate ( string $template ) | Set custom javascript template. | |
setTitle ( string $title, array $attributes ) : array | Set title attribute of an array if not set. | |
table ( array $attributes = [], boolean $drawFooter = false ) : string | Generate DataTable's table html. |
Method | Description | |
---|---|---|
decodeAjaxDataFunction ( string $function, string $json ) : string | Decode ajax data method. | |
decodeCallbackFunctions ( array $callbackFunctions, string $json ) : string | Decode DataTables callbacks function. | |
decodeColumnFunctions ( array $columnFunctions, string $json ) : string | Decode columns render functions. | |
encodeAjaxDataFunction ( array $parameters ) : mixed | Encode ajax data function param. | |
encodeCallbackFunctions ( array $parameters ) : array | Encode DataTables callbacks function. | |
encodeColumnFunctions ( array $parameters ) : array | Encode columns render function. | |
template ( ) : string | Get javascript template to use. |
Method | Description | |
---|---|---|
compileCallback ( mixed $callback ) : mixed | string | Compile DataTable callback value. | |
compileTableFooter ( ) : array | Compile table footer contents. | |
compileTableHeaders ( ) : array | Compile table headers and to support responsive extension. |
public __construct ( Illuminate\Contracts\Config\Repository $config, Illuminate\Contracts\View\Factory $view, |
||
$config | Illuminate\Contracts\Config\Repository | |
$view | Illuminate\Contracts\View\Factory | |
$html | ||
$url | ||
$form |
public add ( Yajra\Datatables\Html\Column $column ) | ||
$column | Yajra\Datatables\Html\Column |
public addCheckbox ( array $attributes = [] ) | ||
$attributes | array |
protected encodeAjaxDataFunction ( array $parameters ) : mixed | ||
$parameters | array | |
return | mixed |
protected encodeCallbackFunctions ( array $parameters ) : array | ||
$parameters | array | |
return | array |
protected encodeColumnFunctions ( array $parameters ) : array | ||
$parameters | array | |
return | array |
public generateScripts ( ) : string | ||
return | string |
public getColumns ( ) : |
||
return |
public getQualifiedTitle ( string $title ) : string | ||
$title | string | |
return | string |
public getTableAttribute ( string $attribute ) : mixed | ||
$attribute | string | |
return | mixed |
public parameterize ( array $attributes = [] ) : string | ||
$attributes | array | |
return | string |
public parameters ( array $attributes = [] ) | ||
$attributes | array |
public setTableAttributes ( array $attributes ) | ||
$attributes | array |
public setTemplate ( string $template ) | ||
$template | string |
public Collection,Illuminate\Support $collection | ||
return |
public Repository,Illuminate\Contracts\Config $config | ||
return | Illuminate\Contracts\Config\Repository |
public FormBuilder,Collective\Html $form | ||
return |
public HtmlBuilder,Collective\Html $html | ||
return |
public UrlGenerator,Illuminate\Routing $url | ||
return |
protected array $validCallbacks | ||
return | array |