I have this script in my admin.blade.php
file.
<img src="#" id="editThumbnail">
I want to change the source with JQuery. Here is my script.
var photo = data.user.photo;
$("#editThumbnail").attr("src","{{asset('profile-photos/"+photo+"')}}")
For example, photo
variable has value "marc.jpg"
. But, the photo won't appear. Here is the error from the browser.
GET http://localhost:8000/profile-photos/$quot;+photo+" (404 Not Found)
I have no idea how is this happen. Anyone can help me?