Closed Shonetow closed 2 years ago
Hi, @Shonetow!
The fourth argument if method addScript
specifies a place where it will be shown. By default the place is footer
and will be shown in place where you put {!! Meta::footer()->toHtml() !!}
If you want to show it in a head {!! Meta::toHtml() !!}
, then
$meta->addScript('app.js', asset('js/app.js'), ['defer'], 'head');
Thanks, @butschster!
Solved.
Thanks, @butschster!
Solved.
You are welcome!
Describe the bug
There's no displayed error with this one, it's just the script tag that doesn't show up in the browser's source code.
Expected behavior I expect to see
<script src="http://myapp.test/js/app.js" defer></script>
in the<head>
tag on every page.