helsingborg-stad / render-blade-view
Functionality for rendering Blade components.
0.0.2
2023-03-23 06:13 UTC
Requires (Dev)
- helsingborg-stad/component-library: dev-master
- phpunit/phpunit: 9.6
- squizlabs/php_codesniffer: ^3.7
This package is auto-updated.
Last update: 2024-12-23 13:06:35 UTC
README
render-blade-view
Functionality for rendering PHP Blade views.
Install using Composer
composer require helsingborg-stad/render-blade-view
Requirements
- PHP ^7.4
Usage
class BladeEngine { // The bladeEngine to be passed to BladeView::create must have a render function following this signature. public function render(string $view, array $data):string; } $bladeEngine = new BladeEngine(); $view = 'foo'; $viewData = ['foo' => 'bar']; $bladeView = BladeView::create($bladeEngine); $bladeView->render($view, $viewData);
License
Distributed under the MIT License.