spiral/stempler-bridge

Spiral Framework: Stempler Adapter

v1.2.0 2020-01-18 09:58 UTC

This package is auto-updated.

Last update: 2020-03-18 10:45:33 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>