daspete / patternlab-twig-laravel by daspete

Adds patternlab behaviour to laravel
94
0
3
Package Data
Maintainer Username: daspete
Maintainer Contact: daspetemail@gmail.com (Das PeTe)
Package Create Date: 2016-06-01
Package Last Update: 2016-06-06
Language: PHP
License: MIT
Last Refreshed: 2024-05-14 15:09:04
Package Statistics
Total Downloads: 94
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 0
Total Watchers: 3
Total Forks: 1
Total Open Issues: 3

Requirements

Laravel >= 5

TwigBridge >= 0.7

Installation

composer require daspete/patternlab-twig-laravel

Quickstart

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' => [
    ...
    TwigBridge\ServiceProvider::class,
    Daspete\Laravel\ServiceProvider::class,
]

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' => [
        ...
        'Daspete\Laravel\Patternlab',
    ],
]

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.