Php

Code issue: Which is the link I need to access my public js assets in laravel 5.7?

Hey guys, I’ve got a question, which is the link I need to access my public js assets in laravel 5.7?
I’m trying something like this:
<script src={{ URL::asset('assets/js/multi-select-master/js/jquery.multi-select.js') }} type="text/javascript"></script>
And the js it is located in the folder: ´public/js/multi-select-master´
 
Plus, this is the external jquery folder:
 
You already invited:

yakitoriPB

Upvotes from:

you could use only asset helper https://laravel.com/docs/5.6/helpers#method-asset

Adam Burnham

Upvotes from:

<script src={{ asset('/js/multi-select-master/js/jquery.multi-select.js') }} type="text/javascript"></script>

 should do the trick
From the link above 'The asset function generates a URL for an asset using the current scheme of the request '

nicole oprea

Upvotes from:

try putting it with app.js file folder and point to source. may work

wincent

Upvotes from:

by adding ‘defer’ tag also to the external jquery script call

If you wanna answer this question please Login or Register