Well, I am able to display the images properly but it is still giving me javascript errors in console for no reason. Here is my code:
Fetching categories:
fetchCategory: function(){
this.$http.get('get_category').then(function(response){
this.$set('categories',response.json());
});
}
and here is the table to display the category:
<table class="table table-bordered table-responsive table-striped example1">
<thead>
<tr>
<th>ID</th>
<th>Category Name</th>
<th>Icon</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr v-for="category in categories">
<td>@{{ category.id }}</td>
<td>@{{ category.name }}</td>
<td><img src="{{url('/')}}/@{{ category.icon }}" width="150px"></td>
<td>Edit | Delete</td>
</tr>
</tbody>
</table>
it displays the images properly, however javascript console still shows 2 404 errors indicating the url of the image GET http://localhost/project/%7B%7B%20category.icon%20%7D%7D 404 (Not Found)
Should I ignore this error? Or is there any other method to include base url in the image path?