PHP code example of row-bloom / chrome-php-renderer
1. Go to this page and download the library: Download row-bloom/chrome-php-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 / chrome-php-renderer example snippets
use RowBloom\RowBloom\Support;
use RowBloom\ChromePhpRenderer\ChromePhpRenderer;
app()->get(Support::class);
->registerInterpolatorDriver(ChromePhpRenderer::NAME, ChromePhpRenderer::class)
use RowBloom\ChromePhpRenderer\ChromePhpRenderer;
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