I used the following code to include my js file:
Meta::addJs('admin_js', '/resources/assets/admin_js/admin_app.js');
The file exists but in the console I see status 404.
If I move the file to 'public' folder - all ok. But I want that this file be stored in 'resources' directory
public
or store into storage
and make symlinks.or you need to create symlinks the resources
directory to a public
directory(which is not recommended).
you need to use the most recommended and effective method of Laravel of using Laravel mix. Please use the link below to read about laravel mix a solution.
https://laravel.com/docs/5.6/mix
It will allow you to place your js
assets into resources
directory and make compressed js file in public
which will be used by the setup.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With