It turns out that it doesn't load the styles when I produce the "asset" of blade, but it does load them when I go further back, example:
<link href="../resources/css/styles.css" rel="stylesheet">
Here I load the styles but if I produce this:
<link href="{{ asset('css/styles.css') }}" rel="stylesheet">
Nothing loads for me, why is this and how can I solve it? Beforehand thank you very much! , I will add reference images (pd: I am working with Laravel):
This is what it tells me when I run npm run dev :
And here is the image of my package.json :
The files located in
resources
must be compiled with Laravel Mix , for this you must have Node.js installed, and runnpm install
to install the NPM dependencies andnpm run dev
(or another script, check the filepackage.json
for more information) to compile the JavaScript, SASS, etc. resources. With this you will have the styles and scripts located inpublic
and accessible withpublic_path
orasset
.