AlokDev's avatar

SVG Icons not workin in sub page in laravel. http://127.0.0.1:8000/page-knowledge-base/fonts/LivIconsEvo/svg/morph-folder.svg 404 (Not Found)

I am using live icons in my laravel project. I get an issue while I have subpages in my project SVG icons not found.

I have a js file where I mention SVG icons path.

pathToFolder: 'fonts/LivIconsEvo/SVG/',

IT is working fine when I access the below link.

http://127.0.0.1:8000/page-knowledge-base

but it does not work when I access below link

http://127.0.0.1:8000/page-knowledge-base/categories

Error:- vendors.min.js:2 GET http://127.0.0.1:8000/page-knowledge-base/fonts/LivIconsEvo/svg/morph-folder.svg 404 (Not Found). Anyone know how this link automatically changed.

Thanks

0 likes
4 replies
Sinnbeck's avatar
Sinnbeck
Best Answer
Level 102

Try adding a slash to the path to make sure it is absolute

pathToFolder: '/fonts/LivIconsEvo/SVG/',

Please or to participate in this conversation.