Important
This is a sub-split, for development, pull requests and issues, visit: https://github.com/row-bloom/row-bloom
composer require row-bloom/twig-interpolator
use RowBloom\RowBloom\Support;
use RowBloom\TwigInterpolator\TwigInterpolator;
app()->get(Support::class);
->registerInterpolatorDriver(TwigInterpolator::NAME, TwigInterpolator::class)
Requires:
- PHP >= 8.1
use RowBloom\TwigInterpolator\TwigInterpolator;
use RowBloom\RowBloom\Renderers\HtmlRenderer;
use RowBloom\RowBloom\RowBloom;
app()->get(RowBloom::class)
->addTable([
['title' => 'Title1', 'body' => 'body1'],
['title' => 'Title2', 'body' => 'body2'],
])
->setInterpolator(TwigInterpolator::NAME)
->setTemplate('
<h1>{{ title }}</h1>
<p>Bold text</p>
<div>{{ body }}</div>
')
->setRenderer(HtmlRenderer::class)
->save(__DIR__.'/foo.pdf');
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
The MIT License (MIT). Please see License File for more information.