Download the PHP package beebmx/kirby-blade without Composer
On this page you can find all versions of the php package beebmx/kirby-blade. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package kirby-blade
Kirby Blade
Kirby Blade use Laravel illuminate/view
and jenssegers/blade
packages.
This package enables Laravel Blade for your own Kirby applications.
Installation
Installation with composer
What is Blade?
According to Laravel Blade documentation is:
Blade is the simple, yet powerful templating engine provided with Laravel. Unlike other popular PHP templating engines, Blade does not restrict you from using plain PHP code in your views. In fact, all Blade views are compiled into plain PHP code and cached until they are modified, meaning Blade adds essentially zero overhead to your application. Blade view files use the .blade.php file extension.
Usage
You can use the power of Blade like Layouts, Sub-Views, Blade components.
All the documentation about Laravel Blade is in the official documentation.
Conflicts
Since Kirby 3.7.0
it's important to add the helpers from illuminate/support
to your root index.php
file in your public
directory.
This line should be before your autoload.php
file. The result file should be like:
Options
The default values of the package are:
Option | Default | Values | Description |
---|---|---|---|
beebmx.kirby-blade.bootstrap | false | (bool) | Enable blade facade after the plugin is available |
beebmx.kirby-blade.views | site/cache/views | (string) | Location of the views cached |
beebmx.kirby-blade.directives | [] | (array) | Array with the custom directives |
beebmx.kirby-blade.ifs | [] | (array) | Array with the custom if statements |
All the values can be updated in the config.php
file.
Views
All the views generated are stored in site/cache/views
directory or wherever you define your cache
directory, but you can change this easily:
Directives
By default, Kirby Blade comes with the follows directives:
But you can create your own:
If Statements
Like directives, you can create your own if statements:
After declaration, you can use it like:
Components
Now you can use Blade components natively in Kirby 3.
To display a component its required to place your component in
templates/components
and then you can call it with the prefix x-
in kebab case.
If your component is nested deeper inside the components
directory, you can use the .
character to indicate the place:
You can also send data to the components via "slots" and attributes:
``
All the documentation related to Components is in the Laravel website.
All versions of kirby-blade with dependencies
beebmx/blade Version ^1.8
getkirby/composer-installer Version ^1.2
illuminate/view Version ^10.0|^11.0
ramsey/uuid Version ^4.7