Skip to content

Commit c04fd9c

Browse files
committed
Make export path configurable.
Fix #16
1 parent eafb4ab commit c04fd9c

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

src/Jobs/DataTableExportJob.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function handle()
7474
$dataTable = app()->call([$oTable, 'dataTable'], compact('query'));
7575
$dataTable->skipPaging();
7676

77-
$exportPath = storage_path('app/exports');
77+
$exportPath = config('datatables-export.path', storage_path('app/exports'));
7878

7979
if (! File::isDirectory($exportPath)) {
8080
File::makeDirectory($exportPath);

src/config/datatables-export.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,16 @@
2828
*/
2929
'chunk' => 1000,
3030

31+
/*
32+
|--------------------------------------------------------------------------
33+
| Export path
34+
|--------------------------------------------------------------------------
35+
|
36+
| Export path where generated files will be stored.
37+
|
38+
*/
39+
'path' => storage_path('app/exports'),
40+
3141
/*
3242
|--------------------------------------------------------------------------
3343
| Default Date Format

0 commit comments

Comments
 (0)