I have some files in my laravel project inside public/assets
, however these files are not actually called (only using CDN that works).
app.blade.php
<link href="{{ asset('assets/css/bootstrap.min.css') }}" rel="stylesheets">
<script type="text/javascript" href="{{ asset('assets/js/bootstrap.bundle.min.js') }}"></script>
<script type="text/javascript" href="{{ asset('assets/jquery/jquery-3.6.1.slim.js') }}"></script>
<script type="text/javascript" href="{{ asset('assets/fontawesome/41b4cd8ba8.js') }}"></script>
How to correctly call these files?
CodePudding user response:
the href
for the link
tag should work.
script
tag though doesn't support href
attribute...
you need to change it to src
.
more for the script
supported attributes here
then assuming then paths you added are correct, it will work