mindfactory/cakephp-svgicons

SVG icon helper plugin for CakePHP

Installs: 7

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

Type:cakephp-plugin

0.2.0 2024-05-09 10:21 UTC

This package is auto-updated.

Last update: 2024-05-09 11:40:52 UTC


README

Mindfactory/Svgicons
CakePHP helper to use SVG icons installed with a package manager like npm

Quick setup

composer require mindfactory/cakephp-svgicons
bin/cake plugin load Mindfactory/Svgicons

Add the helper in src/View/appView.php.

 $this->addHelper('Mindfactory/Svgicons.Icon', [
    'iconSets' => [
        'default' => [
            'svg' => '/path/to/{icon}.svg'],
    ],
]);

Use the helper in your view

<?= $this-Icon->get('iconName') ?>

For further details see the Documentation