PHP code example of digitonic / laravel-favicon-extractor

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

    

digitonic / laravel-favicon-extractor example snippets


$favicon = FaviconExtractor::fromUrl('https://laravel.com')->fetchOnly();

FaviconExtractor::fromUrl('https://laravel.com')->fetchAndSaveTo('favicons');
// returns favicons/HIgLtwL0iUdNkwfq.png

FaviconExtractor::fromUrl('https://laravel.com')->fetchAndSaveTo('favicons', 'myFilename');
// returns favicons/myFilename.png

StefanBauer\LaravelFaviconExtractor\FaviconExtractorServiceProvider::class,

'FaviconExtractor' => StefanBauer\LaravelFaviconExtractor\Facades\FaviconExtractor::class,
shell
php artisan vendor:publish --provider="StefanBauer\LaravelFaviconExtractor\FaviconExtractorServiceProvider" --tag="config"