PHP code example of andaletech / laravel-browser-info

1. Go to this page and download the library: Download andaletech/laravel-browser-info 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/ */

    

andaletech / laravel-browser-info example snippets

 php
$languages = BrowserInfo::getLanguages();
Log::info('Supports French', ['output' => $languages->supports('fr')]); // true
Log::info('Supports French', ['output' => $languages->supports('fr', true)]); // true
Log::info('Supports French from France strict', ['output' => $languages->supports('fr-FR')]); // false
Log::info('Supports Spanish (any)', ['output' => $languages->supports('es-ES')]); // true