Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sirdiego/laravel-fluid-bridge
TYPO3.Fluid support for Laravel.
https://github.com/sirdiego/laravel-fluid-bridge
bridge fluid laravel laravel-template php template template-engine typo3 typo3-fluid
Last synced: 2 days ago
JSON representation
TYPO3.Fluid support for Laravel.
- Host: GitHub
- URL: https://github.com/sirdiego/laravel-fluid-bridge
- Owner: sirdiego
- License: mit
- Created: 2016-09-02T11:59:51.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2016-09-07T11:42:02.000Z (about 8 years ago)
- Last Synced: 2024-04-02T10:20:00.289Z (8 months ago)
- Topics: bridge, fluid, laravel, laravel-template, php, template, template-engine, typo3, typo3-fluid
- Language: PHP
- Size: 85 KB
- Stars: 3
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Installation
```bash
composer require diego/laravel-fluid-bridge dev-master
```
In the `config/app.php` add `FluidServiceProvider` to the `providers` section.
```php
'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:
```php
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.