Search code examples
phplaravellaravel-storage

Laravel storage issue with windows apache virtual host


I'm having issue with Laravel storage displaying image. i've enabled virtual host but when i click on the image url it goes to http://localhost/storage/. The same issue even with php artisan serve Here is the code on my blade:

 @foreach($course->thumbnail as $key => $media)
                                    <a href="{{ $media->getUrl() }}" target="_blank" style="display: inline-block">
                                        <img src="{{ $media->getUrl('thumb') }}">
                                    </a>
                                @endforeach

Any help is appreciated,


Solution

  • I think I may have posted this too early lol, got it solved :) Apparently i forget to change the URL on the .env file to the virtual host.