PHP code example of beaubus / php-favicon

1. Go to this page and download the library: Download beaubus/php-favicon 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/ */

    

beaubus / php-favicon example snippets




con = new \Beaubus\PhpFavicon('/path-to-the/public');
$favicon->init(
    'pocket watch', // Favicon name 
     true           // Check if the favicon has changed. Set it to 'false' once you have chosen and tested your favicon.
 ); 

echo $favicon->tags();

$favicon->tags([
    'mask-icon' => '#5bbad5',
    'msapplication-TileColor' => '#2d89ef',
    'theme-color' => '#ffffff',
]);
shell
composer