From 78e70fec3b136e3a1da489d3698e04b3524203a6 Mon Sep 17 00:00:00 2001 From: Nabeel Shahzad Date: Thu, 22 Mar 2018 12:48:27 -0500 Subject: [PATCH] Fix directory creation path --- app/Services/ExportService.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/Services/ExportService.php b/app/Services/ExportService.php index fd56983b..30178b84 100644 --- a/app/Services/ExportService.php +++ b/app/Services/ExportService.php @@ -10,7 +10,7 @@ use Illuminate\Support\Collection; use League\Csv\CharsetConverter; use League\Csv\Writer; use Illuminate\Support\Facades\Storage; - +use Log; /** * Class ExportService @@ -49,8 +49,10 @@ class ExportService extends Service protected function runExport(Collection $collection, ImportExport $exporter): string { $filename = 'export_' . $exporter->assetType . '.csv'; - Storage::makeDirectory(storage_path('app/import')); - $path = storage_path('app/import/'.$filename.'.csv'); + + // Create the directory - makes it inside of storage/app + Storage::makeDirectory('import'); + $path = storage_path('/app/import/export_'.$filename.'.csv'); $writer = $this->openCsv($path);