Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

bencarter78@hotmail.com's avatar

Storage::get not working as expected

Hi all

I'm just trying to get a file with the following and dump the contents

$file = Storage::get(public_path('application.txt'));
dd($file);

However it's giving me an error...

[Illuminate\Contracts\Filesystem\FileNotFoundException]
  /home/vagrant/Sites/tp/ava/public/application.html

  [League\Flysystem\FileNotFoundException]
  File not found at path: home/vagrant/Sites/tp/ava/public/application.html

The file is definitely there, I'm wondering if the 'File not found at path: home/vagrant/Sites/tp/ava/public/application.html' is removing the '/' from the beginning of the file path or am I just using it wrong?

$file = File::get(public_path('application.txt'));
dd($file);

This works as expected.

Any ideas?

0 likes
1 reply
bencarter78@hotmail.com's avatar

Forget that, just needed to read the docs properly.

"The filesystem configuration file is located at config/filesystems.php. Within this file you may configure all of your "disks". Each disk represents a particular storage driver and storage location. Example configurations for each supported driver is included in the configuration file. So, simply modify the configuration to reflect your storage preferences and credentials."

Please or to participate in this conversation.