footer_add(), header_add() table()
The Add button below or above the table: a footer_link() with the add link, icon and ajax class.
table()->footer_add($name = '', $link = '', $extra = [])
table()->header_add($name = '', $link = '', $extra = [])Options
| Option | Meaning |
|---|---|
$name | Default add; the options array may come first. |
$link | Default url('/@object/add'). |
no_ajax | No ajax_add class. |
(link options) | Every option of footer_link(). |
Example
No records
Code
return table([], ['no_records_simple' => 1])
->text('name')
->header_add(['link' => '#add-top', 'no_ajax' => 1])
->footer_add('New product', '#add', ['no_ajax' => 1]);See also: table/footer_link, table/btn_edit