spiral/stempler-bridge

Spiral Framework: Stempler Adapter

v1.3.1 2020-07-07 10:35 UTC

This package is auto-updated.

Last update: 2020-07-07 10:37:18 UTC


README

Latest Stable Version Build Status Codecov

Installation

The extension requires spiral/views package.

$ composer require spiral/stempler-bridge

To enable extension modify your application by adding Spiral\Stempler\Bootloader\StemplerBootloader:

class App extends Kernel
{
    /*
     * List of components and extensions to be automatically registered
     * within system container on application start.
     */
    protected const LOAD = [
        // ...
        
        Spiral\Stempler\Bootloader\StemplerBootloader::class,
    ];
}

Usage

You can now use view files via extension .dark.php.

<extends:layouts.parent title="My Page"/>
<use:element path="path/element"/>

<block:content>
    <element label="hello world">{{ $variable }}</element>
</block:content>