Blade SVG for Sage is a wrapper for Blade SVG by Adam Wathan allowing you to easily use SVG's in your Blade templates, either as inline SVG or using SVG sprites when using Sage 9.
Install via Composer from your theme directory:
$ composer require log1x/blade-svg-sage
Edit app/filters.php
on your Sage theme and use these filters to modify the default configuration (as in the examples below):
add_filter('bladesvg_spritesheet_path', function () {
return \BladeSvgSage\get_dist_path('images/svg/icons');
});
add_filter('bladesvg_image_path', function () {
return \BladeSvgSage\get_dist_path('images/svg/icons');
});
add_filter('bladesvg_inline', function () {
return true;
});
add_filter('bladesvg_class', function () {
return 'svg';
});
add_filter('bladesvg_sprite_prefix', function () {
return '';
});
<ul>
<li>@svg('phone')</li>
<li>{{ \BladeSvgSage\svg_image('phone-alt') }}</li>
</ul>
For more examples of usage, please refer to the original blade-svg readme.