php - Laravel: Storage::disk('public') points to https://localhost/ in production server, not in dev
one text
My development server is called jb.test
my production server is (let's say) jb.com
. I'm uploading images using Livewire's methods:
$url = $this->photo->store('ranker', 'public');
According to documentation here. I used the second parameter "public" to use the configured public storage.
When I extract the image in the development server I use:
Storage::disk('public')->url($o->imagen_url)
The $o
variable is the object that is storing the image (comes from a @foreach
in a Blade)
This produces http://jb.test/storage/ranker/.....jpg
as expected, and displays the image. Now, this very exact code, in the production server produces https://localhost/storage/ranker/.....jpg
and of course, it gets no image
So... why this happens? is it a wrong configuration?
Source