Skip to content

Improve error handling in API requests #119

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 345 commits into
base: 6.0
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
345 commits
Select commit Hold shift + click to select a range
debf5a9
Merge pull request #9 from kaynami/organized-engine-folder
yajra Oct 28, 2017
1d14d47
Add Post method Export Instructions
jsarmientoOB Nov 3, 2017
95ede0b
change to post-export, add routes instruction
jsarmientoOB Nov 3, 2017
6523b59
change routes instruction
jsarmientoOB Nov 3, 2017
50e8c69
Merge pull request #10 from jiwom/master
yajra Nov 3, 2017
4464b36
wrong function call
challet Nov 16, 2017
2afb557
Merge pull request #11 from challet/patch-1
yajra Nov 17, 2017
84bda72
Use camelCase variable name.
yajra Nov 17, 2017
c7e256e
Revert "Organized engine docs."
yajra Nov 17, 2017
3f16fd4
Revert "Organized response folder."
yajra Nov 17, 2017
c0fda1f
Revert "Organized html builder plugin docs."
yajra Nov 17, 2017
9208082
Revert "Organized button documents"
yajra Nov 17, 2017
78e4451
Merge pull request #15 from yajra/revert-6-organized-folders-button
yajra Nov 17, 2017
21322b3
Merge pull request #13 from yajra/revert-8-organized-response-folder
yajra Nov 17, 2017
000d49b
Merge pull request #12 from yajra/revert-9-organized-engine-folder
yajra Nov 17, 2017
e70f855
Merge branch 'master' into revert-7-organized-html-builder
yajra Nov 17, 2017
e72ebdf
Merge pull request #17 from yajra/revert-7-organized-html-builder
yajra Nov 17, 2017
8d9fc36
Group docs by section.
yajra Nov 17, 2017
181240e
Remove deprecated docs.
yajra Nov 17, 2017
afe1fab
Fix route
Konafets Dec 14, 2017
b8f7bf2
Merge pull request #18 from Konafets/patch-1
yajra Dec 14, 2017
404a8c4
Add dataTable editor plugin docs.
yajra Dec 16, 2017
4fba14e
Fix title and special thanks.
yajra Dec 16, 2017
4691131
Fix options list.
yajra Dec 16, 2017
b44ce7b
Add doc links.
yajra Dec 16, 2017
e19d400
Fix typo.
yajra Dec 16, 2017
feb4028
Add notes on premium license for editor.
yajra Dec 16, 2017
eb17ad9
Add editor usage docs.
yajra Dec 16, 2017
d814dba
Add CSRF token docs.
yajra Dec 16, 2017
4c0edb9
Fix typo.
yajra Dec 16, 2017
44fff9b
Add editor model docs.
yajra Dec 16, 2017
df5242f
Fix typo.
yajra Dec 16, 2017
5ba3c27
Fix tips.
yajra Dec 16, 2017
5cd75ce
Add notes about models fillable property.
yajra Dec 18, 2017
b53faee
Remove namesapce.
yajra Dec 18, 2017
16114f2
Add link to event hooks.
yajra Dec 18, 2017
1b57388
Add editor tutorial.
yajra Dec 18, 2017
58b398e
Update default generator.
yajra Dec 23, 2017
3112a86
Add docblocks.
yajra Dec 24, 2017
29f0be7
Little changes about Laravel version
yusufkandemir Mar 20, 2018
157a8e9
Add documentation for make:transformer command
yusufkandemir Mar 20, 2018
d0375b2
Merge pull request #20 from BlackCaptainTR/master
yajra Mar 28, 2018
f009889
Update docs as per issue:
yajra Mar 28, 2018
f671100
Update param.
yajra Mar 28, 2018
de544b7
Add link to setFilteredRecords documentation.
patrickwarner May 22, 2018
721267b
Merge pull request #22 from forgottencreature/filtered-count
yajra May 23, 2018
59dc062
Add with closure docs.
yajra Jun 3, 2018
54f420d
Add withQuery api doc.
yajra Jun 3, 2018
6dfc985
Remove note.
yajra Jun 3, 2018
ac7a5dc
Fix closue use model.
yajra Jun 4, 2018
363d202
Add export column Docs
jsarmientoOB Oct 2, 2018
2a70d67
Add print column
jsarmientoOB Oct 2, 2018
7f16060
Add menu link for documentation export columns
jsarmientoOB Oct 2, 2018
e2c87b9
Add menu link for documentation print columns
jsarmientoOB Oct 2, 2018
682a6de
Merge pull request #23 from jiwom/master
yajra Oct 2, 2018
f9bde7b
Merge pull request #24 from jiwom/print-column
yajra Oct 2, 2018
740c6cb
Add new line after each section.
yajra Oct 2, 2018
5f540b2
Merge pull request #27 from yajra/fix-cs
yajra Oct 2, 2018
238c7a7
Add section for community links.
yajra Oct 2, 2018
ff83152
Merge pull request #28 from yajra/community-links
yajra Oct 2, 2018
abfe8ec
Merge branch 'master' into documentation-print
yajra Oct 2, 2018
29a6328
Merge pull request #26 from jiwom/documentation-print
yajra Oct 2, 2018
f7c6f54
Merge branch 'master' into documentation-export
yajra Oct 2, 2018
eb0b1b1
Merge pull request #25 from jiwom/documentation-export
yajra Oct 2, 2018
a86a8a9
Add article link
wremon Oct 2, 2018
271a65f
Merge pull request #30 from wremon/Community_Links
yajra Oct 2, 2018
c34c25f
Add video link
wremon Oct 2, 2018
289ac09
Merge pull request #31 from wremon/Community_Links
yajra Oct 2, 2018
36d09f1
Fix page
wremon Oct 2, 2018
cbe9388
Merge pull request #32 from wremon/Export_column_fix
yajra Oct 2, 2018
e85ed4c
Fix row editing header.
jidagob Oct 2, 2018
8e51836
Add docs for export column.
jidagob Oct 2, 2018
a870d4c
Merge pull request #33 from jidago/patch-1
yajra Oct 2, 2018
8d02c4c
Merge pull request #34 from jidago/patch-2
yajra Oct 2, 2018
9a47f31
Add docs for print column.
jidagob Oct 2, 2018
0764080
Merge pull request #35 from jidago/patch-3
yajra Oct 2, 2018
440efc2
Add video reference link.
jidagob Oct 2, 2018
9886568
Add article reference link.
jidagob Oct 2, 2018
3b1b653
Merge pull request #36 from jidago/patch-4
yajra Oct 2, 2018
48ebca8
removed link, package was not used
kaynami Oct 2, 2018
f65b937
Merge pull request #38 from kaynami/patch-1
yajra Oct 2, 2018
3d6bbae
Merge pull request #37 from jidago/patch-5
yajra Oct 2, 2018
17c133b
Added useful video link how to use Laravel 5.4 datatables (yajra v.7.0)
kaynami Oct 2, 2018
6166206
Added another video tutorial on how to use Yajra Laravel DataTables
kaynami Oct 2, 2018
12a4177
Merge pull request #39 from kaynami/patch-2
yajra Oct 2, 2018
763f219
Merge branch 'master' into patch-3
yajra Oct 2, 2018
7bec936
Merge pull request #40 from kaynami/patch-3
yajra Oct 2, 2018
8261d4a
Create docs for only column response.
redredimano Oct 30, 2018
64dc53b
Create DataTables response using laravel model resource.
redredimano Oct 30, 2018
516eb78
Merge pull request #41 from gredimano/response-only
yajra Oct 30, 2018
01b02b5
Add response resource link.
redredimano Oct 30, 2018
69d23ac
Merge pull request #42 from gredimano/response-resource
yajra Oct 30, 2018
908a44b
Add mutated / hidden columns.
redredimano Oct 30, 2018
abfd8e2
Merge pull request #43 from gredimano/response-resource-link
yajra Oct 30, 2018
dd14551
Merge pull request #44 from gredimano/add-columns
yajra Oct 30, 2018
4bb2f71
Add column links.
redredimano Oct 30, 2018
00c2d21
Merge pull request #45 from gredimano/add-columns-link
yajra Oct 30, 2018
d4046e9
Add html builder postAjax docs.
jaydons Oct 30, 2018
4d1d7f5
Add postAjax doc link.
jaydons Oct 30, 2018
63285d5
Merge pull request #46 from jaydons/jaydons-patch-1
yajra Oct 30, 2018
d4b3396
Merge pull request #47 from jaydons/jaydons-patch-2
yajra Oct 30, 2018
9da07ab
Fix DT_RowIndex name.
jaydons Oct 30, 2018
99ff988
Merge pull request #48 from jaydons/jaydons-patch-2
yajra Oct 30, 2018
d653a82
Fix index column name.
yajra Nov 13, 2018
3e7ab87
Updated docs due to changes in yajra/laravel-datatables-fractal
c00p3r Nov 15, 2018
846c35e
Typo fixes.
yajra Nov 16, 2018
0e7bb37
Merge pull request #49 from c00p3r/patch-1
yajra Nov 16, 2018
d642bba
Add simple pagination docs.
yajra Nov 20, 2018
355d1ac
Docs for https://github.com/yajra/laravel-datatables/pull/1912
yajra Nov 20, 2018
e2f0975
Make hidden
Arkhas May 21, 2019
088f22e
Bump installation to v9.0
yajra Jul 5, 2019
6438941
Add column class builder docs.
yajra Jul 5, 2019
966ddab
Update code samples with changes in version 1.8.0
Xint0-elab Jul 15, 2019
064436f
Fix innaccuracy in hooks examples.
Xint0-elab Jul 15, 2019
265cdff
Merge pull request #53 from Xint0/52-Update-editor-events-code-sample…
yajra Aug 17, 2019
27709b9
Merge pull request #51 from Arkhas/master
yajra Aug 22, 2019
377f5a5
Add startsWithSearch docs.
yajra Aug 31, 2019
4744858
Add upload docs.
yajra Sep 10, 2019
a64588e
Typo.
yajra Sep 10, 2019
2016f10
Fix typo for config.md
jsarmientoOB Oct 2, 2019
9ddb8a4
Merge branch 'documentation-print' of https://github.com/jiwom/larave…
jsarmientoOB Oct 2, 2019
a08f949
Add example of orderColumn using closure
jsarmientoOB Oct 2, 2019
52f1506
edit example order column
jsarmientoOB Oct 2, 2019
937edb9
Add space and CS fix
jsarmientoOB Oct 2, 2019
94745b9
revert buttons config
jsarmientoOB Oct 3, 2019
330db4c
Merge pull request #57 from jiwom/order-column
yajra Oct 3, 2019
69ae873
Add new Laravel 6 quick starter doc.
yajra Nov 8, 2019
cbffccf
Remove select plugin.
yajra Nov 8, 2019
41acc76
Update title.
yajra Nov 8, 2019
d383318
Set project name.
yajra Nov 8, 2019
99e3490
Shorten title.
yajra Nov 8, 2019
c85df2d
Update editor tutorial using yarn / npm.
yajra Nov 11, 2019
68e8f26
Include select extension.
yajra Nov 13, 2019
86d2536
Add missing dt styles.
yajra Nov 14, 2019
bc8222d
Add main editor script and styles.
yajra Nov 14, 2019
79072e0
Fix sass path and add setRowId.
yajra Nov 15, 2019
3202d03
Replace make(true) with toJson
andytan07 Jan 20, 2020
d093dcc
Merge pull request #61 from andytan0727/patch-1
yajra Jan 21, 2020
fcd6b31
Update html-installation.md
skys215 Feb 21, 2020
bac00f1
Update buttons-installation.md
skys215 Feb 21, 2020
9c3d65c
Merge pull request #62 from skys215/patch-2
yajra Feb 22, 2020
c16b79e
Merge pull request #63 from skys215/patch-1
yajra Feb 22, 2020
dece4e9
add note for addColumn api
zahedulhossain Mar 19, 2020
2ba429b
Merge pull request #64 from zahedulhossain/patch-1
yajra Mar 19, 2020
0ef23dd
Fix typo
Oussama-Tn Apr 11, 2020
ce55fef
Merge pull request #65 from Oussama-Tn/patch-1
yajra Apr 14, 2020
adc481f
Update relationships.md
3s777 Apr 28, 2020
d42d16d
Merge pull request #68 from 3s777/patch-3
yajra Apr 28, 2020
3b9e9f8
Fix https://github.com/yajra/laravel-datatables/issues/2387.
yajra May 8, 2020
2a7d186
fix broken link in sidebar
miken32 Oct 6, 2020
847dc54
Merge pull request #69 from miken32/patch-1
yajra Oct 7, 2020
941dd74
Add disable ordering sample code.
redredimano Oct 7, 2020
023f22a
Merge pull request #70 from gredimano/patch-1
yajra Oct 31, 2020
f60a075
Typo corrected
mertasan Nov 20, 2020
10834f1
Merge pull request #71 from mertasan/patch-1
yajra Nov 20, 2020
399916c
Typo
odnmalau Nov 30, 2020
9e4c232
Merge pull request #72 from fransiscusrolandamalau/fix-correct-code
yajra Dec 1, 2020
9e19825
Add Laravel Excel and FastExcel quick integration docs.
yajra Mar 19, 2021
c87047b
Add notes for the limitations.
yajra Sep 30, 2021
2e7080f
Fix typo.
yajra Sep 30, 2021
379060c
Added setRowId description
schonhoff Mar 26, 2022
079e2ae
Merge pull request #73 from schonhoff/master
yajra Mar 27, 2022
cd867fb
Added SearchPanes documentation
Arne1303 Jul 7, 2022
5b39c6f
Merge pull request #74 from Arne1303/search-panes-documentation
yajra Jul 14, 2022
13c6371
Fix link
yajra Jul 14, 2022
7e7a09c
Bump version to L9
yajra Jul 14, 2022
195e19a
Add deprecation notes
yajra Jul 14, 2022
c47b263
Bump to v9
yajra Jul 14, 2022
a41c7ba
Add fractal plugin section
yajra Jul 14, 2022
7dd6959
Fix publish cmd
yajra Jul 14, 2022
5f3347e
Add section for export plugin
yajra Jul 14, 2022
eed782b
Add section for export plugin
yajra Jul 14, 2022
83f08d6
Use docs from repo
yajra Jul 14, 2022
e80661f
Add more export docs
yajra Jul 14, 2022
e65838b
Add more export docs
yajra Jul 14, 2022
6eade25
Remove file
yajra Jul 14, 2022
dada81b
Added missing quote to highlight library names
hameesakhan Jul 19, 2022
058b95b
Merge pull request #75 from hameesakhan/patch-1
yajra Jul 20, 2022
94275f2
remove api
yajra Oct 13, 2022
b0999aa
docs: update quick starter to work with vitejs
yajra Oct 19, 2022
163a1b5
initial revisions for a few document files v10.0
mark-git07 Oct 23, 2022
e1ae9ec
Merge pull request #76 from mark-git07/v10-documentation-revisions
yajra Oct 24, 2022
689ab86
docs: use h2 & h3
yajra Oct 26, 2022
79c39a8
Merge branch 'master' into 10.0
yajra Oct 26, 2022
09578cc
Revert "docs: use h2 & h3"
yajra Oct 26, 2022
f4bc1d0
docs: remove some badge
yajra Oct 27, 2022
83b8c1f
Update buttons-installation.md
yajra Oct 27, 2022
044a11a
docs: 5.5+
yajra Oct 27, 2022
98c518e
docs: remove link to old tutz
yajra Oct 27, 2022
a560821
docs: bootcamp style quick starter
yajra Oct 27, 2022
29fab38
fix: typo
yajra Oct 27, 2022
0f51be9
use image from site
yajra Oct 27, 2022
6f945e8
Update documentation.md
yajra Oct 27, 2022
0a47958
typo
yajra Oct 27, 2022
9832eaa
Update search-panes-starter.md
yajra Oct 27, 2022
3f40edc
Update search-panes-starter.md
yajra Oct 27, 2022
4a34b91
remove demo app link
yajra Oct 27, 2022
181c41d
Update response-array.md
yajra Oct 27, 2022
d36787f
Update html-builder.md
yajra Oct 27, 2022
01be62e
Update html-builder.md
yajra Oct 27, 2022
b5b423a
Fix typo
ejgandelaberon Oct 27, 2022
f21ba2e
Fix typo
ejgandelaberon Oct 27, 2022
5dcb29f
Merge pull request #77 from ejgandelaberon/patch-1
yajra Oct 27, 2022
0f881a3
Merge pull request #78 from ejgandelaberon/patch-2
yajra Oct 27, 2022
e024fbf
Update search-panes-starter.md
yajra Nov 3, 2022
a542888
Update documentation.md
yajra Nov 3, 2022
178e1c0
Tweaked SearchPanes chapter titles
Arne1303 Jan 14, 2023
cdcc48c
Merge pull request #80 from Arne1303/tweak-searchpanes-doc
yajra Jan 14, 2023
dfbf545
Update installation.md
yajra Feb 20, 2023
20aa69e
docs: remove package version
yajra Feb 20, 2023
79bda83
docs: laravel 10 + vitejs setup
yajra Feb 20, 2023
94bd530
fix: route
yajra Feb 20, 2023
bfed2fd
docs: add postinstall first
yajra Feb 20, 2023
944538f
docs: shorter title
yajra Feb 20, 2023
a65a0b6
docs: laravel 9 & 10 install docs
yajra Feb 21, 2023
39150e3
docs: fix installer
yajra Feb 21, 2023
0519c59
Update html-builder-column-builder.md
raulmainlab Mar 1, 2023
13a0599
docs: Builder::useVite() helper
yajra Mar 16, 2023
04f0bc2
docs: use latest version constraint
yajra Mar 21, 2023
f2adb9e
docs: add actions property type
yajra Mar 24, 2023
6a1823d
docs: update generated service class
yajra Mar 29, 2023
bd93c8d
chore: use English
yajra Apr 15, 2023
ab0099d
Merge pull request #83 from raulmainlab/patch-2
yajra Apr 15, 2023
a54b469
add exportRender how to use to document (this method added on commit …
mrezagolestan May 7, 2023
4241867
docs: controller to dataTable class
yajra May 10, 2023
183760b
Update releases.md
meshackjr Jun 24, 2023
b3b0dbf
Update edit-column.md
Arkhas Jun 30, 2023
554c576
Merge pull request #93 from Arkhas/edit-selected-columns
yajra Jul 1, 2023
39cd196
add exportRender
mrezagolestan Jul 31, 2023
101f5a0
Merge pull request #87 from mrezagolestan/10.0
yajra Jul 31, 2023
d975b4b
fix: cs
yajra Sep 13, 2023
3c51868
bump to v10
yajra Sep 21, 2023
c00d775
Update edit-column.md
OzanKurt Sep 29, 2023
6452216
Merge pull request #96 from OzanKurt/patch-1
yajra Sep 29, 2023
d6bf8e2
fix: searchPanes column def
yajra Sep 30, 2023
2f70c3c
docs: add docs to display specific column index
yajra Sep 30, 2023
1b50876
Merge pull request #92 from meshackjr/10.0
yajra Sep 30, 2023
e4f8c88
docs: columnDef must used when using buttons
jaydons Oct 2, 2023
e05fbe2
docs: add collapse option
jaydons Oct 2, 2023
fd0d8d2
Merge pull request #99 from jaydons/patch-2
yajra Oct 2, 2023
1a2fd60
Merge pull request #98 from jaydons/patch-1
yajra Oct 2, 2023
b6cc3f2
docs: initCollapsed option
jaydons Oct 2, 2023
14b50f4
Merge pull request #100 from jaydons/patch-1
yajra Oct 2, 2023
3f3825e
docs: show option
jaydons Oct 2, 2023
97e3e68
Merge pull request #101 from jaydons/patch-1
yajra Oct 2, 2023
78ae1c8
Add scout search
frknakk Nov 7, 2023
fd97eaa
Add html additional js scripts
frknakk Nov 7, 2023
7eab700
Merge pull request #102 from frknakk/10.0
yajra Nov 8, 2023
1ae2256
Add Article Community link
alphaolomi Mar 6, 2024
b139bd4
Merge pull request #105 from alphaolomi/patch-1
yajra Mar 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 15 additions & 13 deletions add-column.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,38 @@
# Add Column

You can add a custom column on your response by using `addColumn` api.
You can add a custom column to your response by using the `addColumn` api.

> {note} added columns are assumed to be computed columns and not part of the database. Thus, search/sort will be disabled for those columns. If you need them, use the `editColumn` api instead.

<a name="blade"></a>
## Add Column with Blade Syntax

```php
use Datatables;
use DataTables;

Route::get('user-data', function() {
$model = App\User::query();

return Datatables::eloquent($model)
return DataTables::eloquent($model)
->addColumn('intro', 'Hi {{$name}}!')
->make(true);
->toJson();
});
```

<a name="closure"></a>
## Add Column with Closure

```php
use Datatables;
use DataTables;

Route::get('user-data', function() {
$model = App\User::query();

return Datatables::eloquent($model)
return DataTables::eloquent($model)
->addColumn('intro', function(User $user) {
return 'Hi ' . $user->name . '!';
})
->make(true);
->toJson();
});
```

Expand All @@ -40,14 +42,14 @@ Route::get('user-data', function() {
> {tip} You can use view to render your added column by passing the view path as the second argument on `addColumn` api.

```php
use Datatables;
use DataTables;

Route::get('user-data', function() {
$model = App\User::query();

return Datatables::eloquent($model)
return DataTables::eloquent($model)
->addColumn('intro', 'users.datatables.intro')
->make(true);
->toJson();
});
```

Expand All @@ -62,13 +64,13 @@ Hi {{ $name }}!
> {tip} Just pass the column order as the third argument of `addColumn` api.

```php
use Datatables;
use DataTables;

Route::get('user-data', function() {
$model = App\User::query();

return Datatables::eloquent($model)
return DataTables::eloquent($model)
->addColumn('intro', 'Hi {{$name}}!', 2)
->make(true);
->toJson();
});
```
52 changes: 52 additions & 0 deletions add-columns.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Add Columns

Add mutated / hidden columns.

<a name="blade"></a>
## Add hidden model columns

```php
use DataTables;

Route::get('user-data', function() {
$model = App\User::query();

return DataTables::eloquent($model)
->addColumns(['foo','bar','buzz'=>"red"])
->toJson();
});
```

<a name="response"></a>
## Example Response

```json
{
"draw": 2,
"recordsTotal": 10,
"recordsFiltered": 3,
"data": [{
"id": 476,
"name": "Esmeralda Kulas",
"email": "[email protected]",
"created_at": "2016-07-31 23:26:14",
"updated_at": "2016-07-31 23:26:14",
"deleted_at": null,
"superior_id": 0,
"foo":"value",
"bar":"value",
"buzz":"red"
}, {
"id": 6,
"name": "Zachery Muller",
"email": "[email protected]",
"created_at": "2016-07-31 23:25:43",
"updated_at": "2016-07-31 23:25:43",
"deleted_at": null,
"superior_id": 1,
"foo":"value",
"bar":"value",
"buzz":"red"
}]
}
```
8 changes: 4 additions & 4 deletions blacklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
Sorting and searching will not work on columns explicitly defined as blacklisted.

```php
use Datatables;
use DataTables;

Route::get('user-data', function() {
$model = App\User::query();

return Datatables::eloquent($model)
return DataTables::eloquent($model)
->blacklist(['password', 'name'])
->make(true);
->toJson();
});
```
```
107 changes: 56 additions & 51 deletions buttons-config.md
Original file line number Diff line number Diff line change
@@ -1,57 +1,62 @@
# Buttons Configurations

<a name="console"></a>
## Artisan Console Configurations
Namespace configuration is used by the datatables command generator.

```php
return [
/**
* DataTables script view template.
*/
'script_template' => 'datatables::script',

/**
* Namespaces used by the generator.
*/
'namespace' => [
/**
* Base namespace/directory to create the new file.
* This is appended on default Laravel namespace.
* Usage: php artisan datatables:make User
* Output: App\DataTables\UserDataTable
* With Model: App\User (default model)
* Export filename: users_timestamp
*/
'base' => 'DataTables',

/**
* Base namespace/directory where your model's are located.
* This is appended on default Laravel namespace.
* Usage: php artisan datatables:make Post --model
* Output: App\DataTables\PostDataTable
* With Model: App\Post
* Export filename: posts_timestamp
*/
'model' => '',
],
'namespace' => [
'base' => 'DataTables',
'model' => '',
],
```

### DataTable Base Namespace/Directory
This is the base namespace/directory to be created when a new DataTable is called.
This directory is appended to the default Laravel namespace.

**Usage:**
```php artisan datatables:make User```

**Output:**
```App\DataTables\UserDataTable```

**Export filename:** ```users_(timestamp)```

### Model Option
This is the base namespace/directory where your models are located.
This directory is appended to the default Laravel namespace.
**Usage:** ```php artisan datatables:make Post --model```
**Output:** ```App\DataTables\PostDataTable```
**With Model:** ```App\Post``
**Export filename:** ```posts_(timestamp)```

/**
* PDF generator to be used when converting the table to pdf.
* Available generators: excel, snappy
* Snappy package: barryvdh/laravel-snappy
* Excel package: maatwebsite/excel
*/
'pdf_generator' => 'excel',

/**
* Snappy PDF options.
*/
'snappy' => [
'options' => [
'no-outline' => true,
'margin-left' => '0',
'margin-right' => '0',
'margin-top' => '10mm',
'margin-bottom' => '10mm',
],
'orientation' => 'landscape',
<a name="pdf-generator"></a>
## PDF Generator
Set the PDF generator to be used when converting your dataTable to PDF.

Available generators are: `excel`, `snappy`

### Excel Generator
When `excel` is used as the generator, the package will use [`maatwebsite/excel`](http://www.maatwebsite.nl/laravel-excel/docs) to generate the PDF.

> To export files to pdf, you will have to include "dompdf/dompdf": "~0.6.1", "mpdf/mpdf": "~5.7.3" or "tecnick.com/tcpdf": "~6.0.0" in your composer.json and change the export.pdf.driver config setting accordingly.

### Snappy Generator (Default Generator)
When `snappy` is used as the generator, you need to install [`barryvdh/laravel-snappy`](https://github.com/barryvdh/laravel-snappy)

### Snappy PDF Options
These are the options passed to `laravel-snappy` when exporting the pdf file.

```php
'snappy' => [
'options' => [
'no-outline' => true,
'margin-left' => '0',
'margin-right' => '0',
'margin-top' => '10mm',
'margin-bottom' => '10mm',
],
];
'orientation' => 'landscape',
],
```
Loading