PHP code example of nalingia / nova-simple-toolbar-link

1. Go to this page and download the library: Download nalingia/nova-simple-toolbar-link 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/ */

    

nalingia / nova-simple-toolbar-link example snippets


use Nalingia\SimpleToolbarLink\SimpleToolbarLink;

//...

public function tools()
{
    return [
        (new SimpleToolbarLink())
                ->name(__('Packagist'))
                ->to('https://packagist.org/')
                ->target('_blank')
                ->icon('<svg class="sidebar-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="var(--sidebar-icon)" d="M8 4c0-1.1.9-2 2-2h4a2 2 0 0 1 2 2h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h2zm0 2H6v14h12V6h-2a2 2 0 0 1-2 2h-4a2 2 0 0 1-2-2zm2-2v2h4V4h-4z"/></svg>');
    ];
}