Most of my assets of my Laravel project are either in /storage
folder or in the /public
folder.
In my blade files, I references these asses with url('/storage/..)
. PhpStorm thinks that those do not exists.
When I commit, each image will add up to one error.
How can I tell PhpStorm that my assets are indeed in this directory?
I tried to add storage
folder to PHP>Laravel>Views/Template
but this doesn't work and I believe I have not fully understood what this path/namespace blade thing is supposed to do.
CodePudding user response:
You could use the asset helper
style="background-image: url('{{ asset('storage/backgrounds/lavender') }}');">dfsdf</div>
CodePudding user response:
do command this
php artisan storage:link
will create shortcut folder in public/storage to path storage/app/public
ineasted of url('/storage/..)
to public_path('storage/....')