diego / laravel-fluid-bridge
TYPO3.Fluid support for Laravel.
dev-master
2016-09-02 21:22 UTC
Requires
- laravel/framework: ^5.3
- typo3fluid/fluid: ^1.0
Requires (Dev)
- phpmd/phpmd: ^2.4
- squizlabs/php_codesniffer: ^2.7
This package is auto-updated.
Last update: 2024-11-21 20:44:53 UTC
README
composer require diego/laravel-fluid-bridge dev-master
In the config/app.php
add FluidServiceProvider
to the providers
section.
'providers' => [ Diego\Fluid\FluidServiceProvider::class, ],
Usage
The Laravel Way
By default you can now resolve ".html" templates with the normal view('name')
call. These files will be rendered by TYPO3.Fluid.
The Extbase Way
Further more you can exten the Diego\Fluid\Controller\AbstractFluidController
instead of the BaseController and use the view like in Extbase:
class Page extends AbstractFluidController { public function welcome() { $this->view->assign('name', 'John'); } }
This will resolve the template name to resources/views/Templates/Page/Welcome.html
automatically and will render the template after the action is finished.