niterain / PhpTalView by niterain

Brings PHPTAL to Laravel
65
3
2
Package Data
Maintainer Username: niterain
Maintainer Contact: levi@eneservices.com (Levi Stanley)
Package Create Date: 2013-10-22
Package Last Update: 2018-01-05
Home Page:
Language: PHP
License: MIT
Last Refreshed: 2024-05-18 15:21:32
Package Statistics
Total Downloads: 65
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 3
Total Watchers: 2
Total Forks: 2
Total Open Issues: 0

Allows you to use PHPTAL seamlessly in Laravel

Installation

Add niterain\PhpTalView as a requirement to composer.json:

composer require niterain/php-tal-view:2.0.1.x-dev

Update your packages with composer update or install with composer install.

Once Composer has installed or updated your packages you need to register PhpTalView with Laravel. Open up app/config/app.php and find the providers key towards the bottom and add:

'Niterain\PhpTalView\PhpTalViewServiceProvider',

Configuration

Currently PhpTalView is set by default to HTML5, however, you can change this setting in its config.php file, XHTML, or XML.

Usage

You call the PhpTalView template like you would any other view:

View::make('hello', array(...))

Filters

PHPTAL also has a nice feature which you can use called filters, for example I have one that bust the cache for images, js, css, this is configurable via the config file.

'preFilters' => array(
    'bustCache',
    'minimizeJs',
    'adderJs'
)