Looking to hire Laravel developers? Try LaraJobs

laravel-sprite maintained by ntpages

Description
Laravel SVG Sprite generator
Author
Last update
2021/05/18 07:51 (dev-master)
License
Links
Downloads
40
Tags

Comments
comments powered by Disqus

Laravel Sprite

Little package that simply offers you the dynamic sprite generation of your svg assets.

Why?

In case you use two or more SVGs on the page specially if the code amount on them is huge.

How?

Simply install the composer package
composer require ntpages/laravel-sprite

Create your svg directories with icons in the configured path, default:
./resources/svg/**/*.svg

Use anywhere you want, default route:\

<svg xmlns="http://www.w3.org/2000/svg">
    <use xlink:href="{{ route('sprite.svg', ['name' => 'directory-name']) }}#icon-name"></use>
</svg>