PHP code example of anaseqal / nova-sidebar-icons

1. Go to this page and download the library: Download anaseqal/nova-sidebar-icons 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/ */

    

anaseqal / nova-sidebar-icons example snippets


use Anaseqal\NovaSidebarIcons\NovaSidebarIcons;
...

public function tools()
    {
        return [
            new NovaSidebarIcons,
            ...
        ];
    }


/**
 * The icon of the resource.
 *
 * @return string
 */
public static function icon() 
{
    // Assuming you have a blade file containing an image
    // in resources/views/vendor/nova/svg/icon-user.blade.php
    return view('nova::svg.icon-user')->render();
}

// By using an image tag
public static function icon() 
{
    return '<img src="/path/to/image.svg" />';
}

// Or simply return it as a string
public static function icon() 
{
    return '<svg class="sidebar-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
                <path fill="var(--sidebar-icon)" d="M4.06 13a8 8 0 0 0 5.18 .... e.t.c."/>
            </svg>';
}
    
bash
php artisan vendor:publish --provider="Anaseqal\NovaSidebarIcons\ToolServiceProvider" --force