digitlab / blade-icons
Laravel Blade SVG icon injection.
v1.0.1
2016-08-11 10:57 UTC
Requires
- php: >=5.6
- illuminate/filesystem: ^5.0
- illuminate/support: ^5.0
- illuminate/view: ^5.0
Requires (Dev)
- mockery/mockery: ~0.9.2
- phpunit/phpunit: ^5.0
- satooshi/php-coveralls: ^0.6
This package is not auto-updated.
Last update: 2024-10-26 20:20:45 UTC
README
An SVG icon injector for Laravel Blade.
Installation
Install using composer:
composer require digitlab/blade-icons
Add the service provider in app/config/app.php:
DigitLab\BladeIcons\BladeIconsServiceProvider::class,
Create the cache path (defaults to /storage/framework/icons) and resource path (defaults to /resources/svgs) as specified in your config.
Usage
You can insert an SVG resource using the blade syntax @icon('name')
.
To override svg attributes, add them in an array: @icon('name', ['width' => 300])
.
CSS
It is suggested that you add the following css to style your icons:
.icon { display: inline-block; vertical-align: text-top; fill: currentColor; }
License
Blade Icons is licensed under The MIT License (MIT).