Answers for "laravel filesystems public"

PHP
2

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
0

laravel filesystem

$exists = Storage::disk('s3')->exists('file.jpg');
Posted by: Guest on October-06-2020

Browse Popular Code Answers by Language