Adds patternlab behaviour to laravel

v0.1.4 2016-06-06 20:31 UTC

This package is not auto-updated.

Last update: 2020-02-21 16:52:18 UTC


Laravel >= 5

TwigBridge >= 0.7


composer require daspete/patternlab-twig-laravel


Once you have installed the package, you need to register it and its dependencies in your app config -> /config/app.php

add following lines to your 'providers' array:

'providers' => [

and add the TwigBridge Facade to your 'aliases' array:

'aliases' => [
    'Twig' => TwigBridge\Facade\Twig::class,

after that, you need to publish the configs of this package and of the TwigBridge package:

    php artisan vendor:publish --provider="TwigBridge\ServiceProvider"
    php artisan vendor:publish --provider="Daspete\Laravel\ServiceProvider"

and edit the new config in /config/twigbridge.php, insert the patternlab extension into the 'extension' array:

'extensions' => [
    'enabled' => [

Resource pack

to get everything working, you'll need some files and directories in the right place.

Download the Resource Pack and unzip the contents into the /resources/ folder.