Simple Symfony/Twig wrapper for FeatherIcons and pixelrobin/php-feather library.
composer require ameotoko/feathericon-bundle
// config/bundles.php
return [
// ...
Ameotoko\FeatherIcon\AmeotokoFeatherIconBundle::class => ['all' => true],
];
The bundle provides new function in your Twig templates, which simply uses getIcon() from php-feather under the hood.
This code in your .html.twig template:
<button type="submit">{{ feathericon('send', {stroke: '#ddd', 'stroke-width': 4}) }} Submit</button>
will produce the same result as:
<?php $icons = new \Feather\Icons(); ?>
<button type="submit"><?= $icons->get('send', ['stroke' => '#ddd', 'stroke-width' => 4], false) ?> Submit</button>
See more about using php-feather.
How can I help you explore Laravel packages today?