Allows you to use Fluid seamlessly in Laravel 5.1.
Fluid >=X.X.X requires Laravel 5.1.
Require this package with Composer
composer require wmdbsystems/fluidlaravel 1.0.x
Once Composer has installed or updated your packages you need to register FluidLaravel with Laravel itself. Open up config/app.php and find the providers key towards the bottom and add:
'FoT3\FluidLaravel\ServiceProvider',
FluidLaravel's configuration file can be extended in your ConfigServiceProvider, under the fluid
key. You can find the default configuration file at vendor/wmdbsystems/fluidlaravel/config
.
You should use Artisan to copy the default configuration file from the /vendor
directory to /config/fluidlaravel.php
with the following command:
php artisan vendor:publish --provider="FoT3\FluidLaravel\ServiceProvider"
If you make changes to the /config/fluidlaravel.php
file you will most likely have to run the fluid:clean
Artisan command for the changes to take effect.
You call the Fluid template like you would any other view:
// Without the file extension
View::make('viewName', [...])
FluidLaravel offers a command for CLI Interaction.
Empty the Fluid cache:
$ php artisan fluid:clean