/ resources is not the best place, since this folder is used for source files and is usually stored in the source code repository (e.g. git).
Files that are generated by the application are usually located somewhere in the / storage folder - just create the / storage / csv folder there.
You should never reference these files directly from your classes. Laravel is what you need - you can read more about them here: http://laravel.com/docs/master/filesystem . They make file operations (for example, read, write, add, add, delete, move, receive all files and much more ...) much easier.
Start by defining file systems in config / filesystems.php
'disks' => [ 'csv' => [ 'driver' => 'local', 'root' => storage_path().'/csv', ], ],
Now you can read / write your CSV files using the Repository from anywhere in your code:
Storage::disk('csv')->put('file.csv', $content); $content = Storage::disk('csv')->get('file.csv');
source share