Can I use laravel filesystem to save file outside current project? I have this structure: project and cdn.
I've tried custom driver but fails. It wont put any file at cdn folder.
'custom' => [
'driver' => 'local',
'root' => '~/Code/cdn.web/storage',
],
$store = Storage::disk('custom')->put('index.txt', 'contents');
I've followed this answer too Storing files outside the Laravel 5 Root Folder But there is no custom driver.
Is there anyway to make it working?
Thanks
Found the answer.
Laravel doesn't support ~ on the path.
I need to put full path to make it working.
'custom' => [
'driver' => 'local',
'root' => '/home/vagrant/Code/cdn.web/storage',
],
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With