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
Requires
- php: >=8.1
- cakephp/cakephp: ^5.0.1
Requires (Dev)
- phpunit/phpunit: ^10.1
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