PHP code example of row-bloom / browsershot-renderer

1. Go to this page and download the library: Download row-bloom/browsershot-renderer 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/ */

    

row-bloom / browsershot-renderer example snippets


use RowBloom\RowBloom\Support;
use RowBloom\BrowsershotRenderer\BrowsershotRenderer;

app()->get(Support::class);
    ->registerInterpolatorDriver(BrowsershotRenderer::NAME, BrowsershotRenderer::class)

use RowBloom\BrowsershotRenderer\BrowsershotRenderer;
use RowBloom\RowBloom\Interpolators\PhpInterpolator;
use RowBloom\RowBloom\RowBloom;

app()->get(RowBloom::class)
    ->addTable([
        ['title' => 'Title1', 'body' => 'body1'],
        ['title' => 'Title2', 'body' => 'body2'],
    ])
    ->setInterpolator(PhpInterpolator::class)
    ->setTemplate('
        <h1><?= $title