Skip to content

Commit 0aefa15

Browse files
committed
Button config doc.
1 parent 91e13ee commit 0aefa15

File tree

2 files changed

+58
-0
lines changed

2 files changed

+58
-0
lines changed

buttons-config.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Buttons Configurations
2+
3+
```php
4+
return [
5+
/**
6+
* DataTables script view template.
7+
*/
8+
'script_template' => 'datatables::script',
9+
10+
/**
11+
* Namespaces used by the generator.
12+
*/
13+
'namespace' => [
14+
/**
15+
* Base namespace/directory to create the new file.
16+
* This is appended on default Laravel namespace.
17+
* Usage: php artisan datatables:make User
18+
* Output: App\DataTables\UserDataTable
19+
* With Model: App\User (default model)
20+
* Export filename: users_timestamp
21+
*/
22+
'base' => 'DataTables',
23+
24+
/**
25+
* Base namespace/directory where your model's are located.
26+
* This is appended on default Laravel namespace.
27+
* Usage: php artisan datatables:make Post --model
28+
* Output: App\DataTables\PostDataTable
29+
* With Model: App\Post
30+
* Export filename: posts_timestamp
31+
*/
32+
'model' => '',
33+
],
34+
35+
/**
36+
* PDF generator to be used when converting the table to pdf.
37+
* Available generators: excel, snappy
38+
* Snappy package: barryvdh/laravel-snappy
39+
* Excel package: maatwebsite/excel
40+
*/
41+
'pdf_generator' => 'excel',
42+
43+
/**
44+
* Snappy PDF options.
45+
*/
46+
'snappy' => [
47+
'options' => [
48+
'no-outline' => true,
49+
'margin-left' => '0',
50+
'margin-right' => '0',
51+
'margin-top' => '10mm',
52+
'margin-bottom' => '10mm',
53+
],
54+
'orientation' => 'landscape',
55+
],
56+
];
57+
```

documentation.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959

6060
- Buttons
6161
- [Installation](/docs/laravel-datatables/{{version}}/buttons-installation)
62+
- [Configuration](/docs/laravel-datatables/{{version}}/buttons-config)
6263
- [Quick Starter](/docs/laravel-datatables/{{version}}/buttons-starter)
6364
- [Excel](/docs/laravel-datatables/{{version}}/buttons-export#excel)
6465
- [CSV](/docs/laravel-datatables/{{version}}/buttons-export#csv)

0 commit comments

Comments
 (0)