I have just installed laravel 8.x and when I tried to get to the login page errors shows up regarding files loading such as CSS or js but only the ones that are located in the resources folder, some suggested copying them from the resources folder to the public folder but it doesn't make any sense to me so I'm looking for a way that I can load files to the public folder same way the laravel does for other files such as view files
here is the way I'm accessing the files
<script src="{{ asset('js/app.js') }}" defer></script>
my webpack.mix.js
const mix = require('laravel-mix');
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel applications. By default, we are compiling the CSS
| file for the application as well as bundling up all the JS files.
|
*/
mix.js('resources/js/app.js', 'public/js').postCss('resources/css/app.css', 'public/css', [
require('postcss-import'),
require('tailwindcss'),
require('autoprefixer'),
]);