Answers for "storage get file from public folder laravel"

PHP
0

laravel get path to storage folder

$path = storage_path('app/file.txt');
Posted by: Guest on October-17-2020
1

how to store file in public folder laravel

You can create a new storage disc in config/filesystems.php
'public_uploads' => [
    'driver' => 'local',
    'root'   => public_path() . '/uploads',
],

And store files like this:

if(!Storage::disk('public_uploads')->put($path, $file_content)) {
    return false;
}
Posted by: Guest on December-12-2021

Code answers related to "storage get file from public folder laravel"

Browse Popular Code Answers by Language