I'm setting up a new Laravel project and I am using PHPStorm. I couldn't help but notice that PHPStorm can't resolve paths in blade templates that are relative to the public/ directory.
Does anyone know of a quick way to address this, without having to use full urls or the blade URL functions?
In the above case, "img/favicon.png" and "css/app.css" are underlined as invalid paths due to PHPStorm not recognizing the paths are relative to the public/ directory.
No, it's not a super big deal. Yes, I know I can disable path resolution warnings in Settings > Inspections... but I'd rather just find a way to get PHPStorm to realize where the files are located.
Oh wow. Just after posting this, I found the answer.
It's in Settings > Directories.
In case anyone else ever stumbles upon this... Go to Settings > Directories, locate the public directory within the Laravel project, right click on it and select "Resource Root". Hit apply. It took a few minutes for everything to catch up. Restarting PHPStorm may speed it up.
Now, all the paths are resolving correctly. The files even pop up in suggestions.