Include external javaScript CSS in laravel 5

- 1 answer

Ad

I m naive to laravel and have to include external javaScript file which is in public/js folder and there is no folder like assets.

Ad

Answer

Ad

add your external js and css under public folder, then

for css, lets say you want to load a css file called demo.css located inside public folder, then

 <link target="_blank" rel="nofollow noreferrer" target="_blank" rel="nofollow noreferrer" href="{{asset('demo.css')}}" rel="stylesheet">

for js

 <script type="text/javascript" src="{{asset('demo.js')}}"></script>
Ad
source: stackoverflow.com
Ad