Laravel SVG directive

Categories: Laravel

I was working on a site and uses Steve Schoger's Heroicons. The Heroicons are svg based and it works best with SVG using HTML inline.

I wrote a custom blade directive so that I can include the inline SVG easily with blade directive.

When I need to use a Heroicons svg, I just need to call it with


given that the svg file is already copied into public/svg directory.

Next | Previous