i have a problem in getting the path of my image in laravel directory in javascript. I already get the image in php but not in javascript here is in my php
<img src="{{ asset('image_files/' . $product->featured_img) }}" />
i tried in my javascript like this and i got error:
$("#feature_img").attr('src',asset('image_files/'+data.product[0].featured_img))