sirdiego / laravel-fluid-bridge by sirdiego

TYPO3.Fluid support for Laravel.
14
3
3
Package Data
Maintainer Username: sirdiego
Maintainer Contact: diego@sirdiego.de (diego)
Package Create Date: 2016-09-02
Package Last Update: 2016-09-07
Language: PHP
License: MIT
Last Refreshed: 2025-02-09 15:11:29
Package Statistics
Total Downloads: 14
Monthly Downloads: 1
Daily Downloads: 0
Total Stars: 3
Total Watchers: 3
Total Forks: 2
Total Open Issues: 0

Installation

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.