PHP code example of phyozawtun / laravel-google-lighthouse
1. Go to this page and download the library: Download phyozawtun/laravel-google-lighthouse 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/ */
phyozawtun / laravel-google-lighthouse example snippets
use Logiek\GoogleLighthouse\GoogleLighthouse;
(new GoogleLighthouse())
->setOutput('report.html')
->audit('http://example.com');
use Logiek\GoogleLighthouse\GoogleLighthouse;
(new GoogleLighthouse())
->performance()
->pwa()
->setOutput('report.html')
->audit('http://example.com');
use Logiek\GoogleLighthouse\GoogleLighthouse;
(new GoogleLighthouse())
->setOutput('example', ['html', 'json'])
->audit('http://example.com');
use Logiek\GoogleLighthouse\GoogleLighthouse;
(new GoogleLighthouse())
->setOption('--throttling.cpuSlowdownMultiplier', 4)
->setOutput('report.html')
->audit('http://example.com');