PHP code example of loadsys / cakephp-svg-icon

1. Go to this page and download the library: Download loadsys/cakephp-svg-icon library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

loadsys / cakephp-svg-icon example snippets

 php
/*
 * src/View/AppView.php
 */
public function initialize(): void
{
    $this->loadHelper('SvgIcon.SvgIcon', [
        'cacheConfig' => 'svg_icon',
    ]);
}
 php
<?= $this->SvgIcon->get('heroicon.home') 
 php
<?= $this->SvgIcon->get('heroicon.home', [
  'class' => 'text-gray-300 h-9 w-9',
  'stroke-width' => '2',
])