A
A
Alexander Ampleev2019-01-31 16:24:37
Laravel
Alexander Ampleev, 2019-01-31 16:24:37

How to get correct file path in laravel 5.3?

The file is in
"/Applications/XAMPP/xamppfiles/htdocs/laravel5l.com/laravel5l/blog/storage/app/public/test.txt"
I'm trying to get the url to it like this:

public function index(Request $request)
    {
        dd(Storage::url('test.txt'));  // выводит урл файла просто по имени без полного пути (на локал не работает)
    }

This outputs the following url: ""/storage/test.txt""
Accordingly, when I enter this url into the browser, this is shown:
5c52f6ef49d09223914647.png
What should be done to display the correct url and display this file on it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
holfza, 2019-01-31
@holfza

https://laravel.com/docs/5.7/filesystem#configuration - for LV

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question