From aadf6013ddb01f41397e187c911fcc7557fe240c Mon Sep 17 00:00:00 2001 From: james Date: Thu, 27 Dec 2018 10:17:27 +0000 Subject: [PATCH] feat: adds ability to set filesystem storage options --- src/Concerns/WithStorageOptions.php | 11 +++++++++++ src/Excel.php | 5 ++++- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 src/Concerns/WithStorageOptions.php diff --git a/src/Concerns/WithStorageOptions.php b/src/Concerns/WithStorageOptions.php new file mode 100644 index 000000000..02f66b131 --- /dev/null +++ b/src/Concerns/WithStorageOptions.php @@ -0,0 +1,11 @@ +export($export, $filePath, $writerType); - return $this->filesystem->disk($disk)->put($filePath, fopen($file, 'r+')); + $options = $export instanceof WithStorageOptions ? $export->storageOptions() : []; + + return $this->filesystem->disk($disk)->put($filePath, fopen($file, 'r+'), $options); } /**