I get the file:
$fileExcel = Storage::path($finreport->filename);
How to creat a copy file and place in the same directory with prefix name _copy?
I get the file:
$fileExcel = Storage::path($finreport->filename);
How to creat a copy file and place in the same directory with prefix name _copy?
2
Answers
First google answer: use File facade
for the file name you can explode, implode the path
If you’re using Storage, to keep it consistent you might want to use
If you’re wanting to prefix you can do something like
Docs: https://laravel.com/docs/10.x/filesystem#copying-moving-files