Hi everyone. after install Laravel 5.2 , And I was copy download img (name:t.jpg) to public folder(img/t.jpg), but I got a problem.
If I use asset() function like this first sample: <div><img src="{{ asset('public/img/t.jpg') }}" /></div> And It's Working ,Will show images in website,
When the first sample is working , I get http://localhost/laravel/public/img/t.jpg . But I want to like this second sample: <div><img src="{{ asset('img/t.jpg') }}" /></div> Can be Working.
Then when the second sample is working , I will just get the same http://localhost/laravel/public/img/t.jpg
So , How do I set something config or will just asset() point to public folder
Please help me to resolve this problem. I'm using Laravel 5.2
Your webserver should have the document root/web root pointing to laravel's public folder. There should not be public in the url at all.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community