jeudi 17 décembre 2015

404 error in loading image: Laravel 5.1

When I am doing ?

In my Laravel 5.1 code, I created the Project with the name of SampleApplication...with the below path

C:\xampp\htdocs\SampleApplication\

Then after successful registration following directories are being created.

C:\xampp\htdocs\SampleApplication\Users

C:\xampp\htdocs\SampleApplication\Users\{UserName}
C:\xampp\htdocs\SampleApplication\Users\{UserName}\Profile
C:\xampp\htdocs\SampleApplication\Users\{UserName}\Profile\User.png

So far everything is ok.

What's the problem ?

In the dashboard page, I am trying to show the image like below.

<img src="{{url('/Users/' . auth()->user()->UserName . '/Profile/' . 
            auth()->user()->UserImage)}}" alt="..." class="img-circle profile_img">

This produces the below path.

http://localhost/SampleApplication/public/Users/UserName/Profile/user.png

What's the error ?

This is giving 404 error for the above image.

Am I missing something ?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire