Uploading file with laravel 5.4

1

I'm following the documentation to upload files to the storage folder, but the path the function returns is not the same path as the file was stored in, look in the documentation :

$path = $request->photo->store('images');

The path returned to $path is /home/usuario/pasta/projeto/images and the file is stored in /home/usuario/pasta/projeto/app/storage/app/images . This last bit " /app/storage/ " was defined by the filesystem.php file inside the config folder:

'disks' => [

    'local' => [
        'driver' => 'local',
        'root' => storage_path('app'),
    ],

    'public' => [
        'driver' => 'local',
        'root' => storage_path('app/public'),
        'url' => env('APP_URL').'/storage',
        'visibility' => 'public',
    ],
    ...

],

How can I get the actual path of the saved file?

    
asked by anonymous 05.02.2018 / 20:17

0 answers