PHP code example of millerphp / laravel-browserless

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

    

millerphp / laravel-browserless example snippets


use MillerPHP\LaravelBrowserless\Facades\Browserless;

$screenshot = Browserless::screenshot()
    ->url('https://example.com')
    ->send();

$pdf = Browserless::pdf()
    ->url('https://example.com')
    ->send();

$performance = Browserless::performance()
    ->url('https://example.com')
    ->send();

$score = $performance->categoryScore('performance');
bash
php artisan vendor:publish --provider="MillerPHP\LaravelBrowserless\ServiceProvider"