Skip to content

Commit c1bb2cb

Browse files
committed
DataTable buttons.
1 parent 97451e7 commit c1bb2cb

File tree

5 files changed

+57
-33
lines changed

5 files changed

+57
-33
lines changed

buttons-config.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Buttons Configurations
1+
# DataTable Service Configurations
22

33
```php
44
return [

buttons-export.md

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,4 +129,56 @@ class UsersDataTable extends DataTable
129129
]);
130130
}
131131
...
132-
```
132+
```
133+
134+
<a name="reset"></a>
135+
## Reset Button
136+
137+
To enable reset button, set `reset` on the buttons array.
138+
139+
```php
140+
namespace App\DataTables;
141+
142+
use App\User;
143+
use Yajra\Datatables\Services\DataTable;
144+
145+
class UsersDataTable extends DataTable
146+
{
147+
//...some default stubs deleted for simplicity.
148+
149+
public function html()
150+
{
151+
return $this->builder()
152+
->columns($this->getColumns())
153+
->parameters([
154+
'buttons' => ['reset'],
155+
]);
156+
}
157+
...
158+
```
159+
160+
<a name="reload"></a>
161+
## Reload Button
162+
163+
To enable reload button, set `reload` on the buttons array.
164+
165+
```php
166+
namespace App\DataTables;
167+
168+
use App\User;
169+
use Yajra\Datatables\Services\DataTable;
170+
171+
class UsersDataTable extends DataTable
172+
{
173+
//...some default stubs deleted for simplicity.
174+
175+
public function html()
176+
{
177+
return $this->builder()
178+
->columns($this->getColumns())
179+
->parameters([
180+
'buttons' => ['reload'],
181+
]);
182+
}
183+
...
184+
```

buttons-installation.md

Lines changed: 0 additions & 21 deletions
This file was deleted.

buttons-starter.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Buttons Quick Starter
1+
# DataTable Service Quick Starter
22

33
## Create Users DataTable
44

documentation.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,8 @@
6262
- [Add Checkbox](/docs/laravel-datatables/{{version}}/html-builder-checkbox)
6363
- [Add Index](/docs/laravel-datatables/{{version}}/html-builder-index)
6464

65-
### PLUGINS
66-
67-
- Buttons
68-
- [Installation](/docs/laravel-datatables/{{version}}/buttons-installation)
69-
- [Configuration](/docs/laravel-datatables/{{version}}/buttons-config)
65+
- Service Class
7066
- [Quick Starter](/docs/laravel-datatables/{{version}}/buttons-starter)
71-
- [Excel](/docs/laravel-datatables/{{version}}/buttons-export#excel)
72-
- [CSV](/docs/laravel-datatables/{{version}}/buttons-export#csv)
73-
- [PDF](/docs/laravel-datatables/{{version}}/buttons-export#pdf)
74-
- [Print](/docs/laravel-datatables/{{version}}/buttons-export#print)
67+
- [DataTable Buttons](/docs/laravel-datatables/{{version}}/buttons-export)
7568
- [Artisan Console](/docs/laravel-datatables/{{version}}/buttons-console)
7669

0 commit comments

Comments
 (0)