I have this line:
$local_document_path = storage_path() . "/app/file/myfile.pdf";
$myfile = Storage::get($local_document_path);
And I get a FileNotFoundException error.
Now I checked the variable and seems correct, and I double checked again by copying the path to clipboard and pasting it:
dd($local_document_path == $copypasted_path)
It returns true. This means that the path is 100% correct, yet it does not work with storage. I have also tried by removing storage_path(); and it does not work either.
Any help?
Thanks in advance.
dd($local_document_path = $copypasted_path)returns true? This is an assignment not a comparison. Unless the value of $copypasted_path is boolean true, that can never return trueappwithin yourstoragefolder in Laravel?Storage::get('app/file/myfile.pdf');should do it, assumingstorage/app/file/myfile.pdfa) exists and b) is readable by the webserver.