Answer the question
In order to leave comments, you need to log in
Why does asset refer to the site root and not the assets folder?
I do the initial steps in Laravel for any lessons, I connect js for example
<script src="{{ asset('/assets/admin/js/admin.js') }}"></script>
<script src="{{ asset('/public/assets/admin/js/admin.js') }}"></script>
Answer the question
In order to leave comments, you need to log in
If the development is local and not through artisan serve, then on openserver (if it is used, I just don’t work with another one), in the settings in the Domains tab, you need to specify the domain name and the desired folder.
If all this is on hosting, then when creating a site, when it requests a directory, you need to specify not just the domain to which it refers, but also add public, because as far as I remember, Apache has a file request limit
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question