2017 © Pedro Peláez
 

library laravel-haml

Wraps MtHaml for ease use in Laravel

image

bkwld/laravel-haml

Wraps MtHaml for ease use in Laravel

  • Monday, December 18, 2017
  • by weotch
  • Repository
  • 13 Watchers
  • 45 Stars
  • 27,173 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 7 Forks
  • 4 Open issues
  • 11 Versions
  • 6 % Grown

The README.md

Laravel Haml

Packagist, (*1)

A small package that adds support for compiling Haml templates to Laravel via MtHaml. Both vanilla php and Blade syntax is supported within the Haml., (*2)

Installation

  1. Add it to your composer.json ("bkwld/laravel-haml": "~2.0") and do a composer install.
  2. Add the service provider to your app.php config file providers: 'Bkwld\LaravelHaml\ServiceProvider',

Configuration

You can set MtHaml environment, options, and filters manually. To do so:, (*3)

  • Laravel 4 : Publish the config file with php artisan config:publish bkwld/laravel-haml and edit at /app/config/packages/bkwld/laravel-haml/config.php
  • Laravel 5 : Publish the config file with php artisan vendor:publish and edit it at /config/haml.php.

For instance, to turn off auto-escaping:, (*4)

'mthaml' => array(
    'environment' => 'php',
    'options' => array(
        'enable_escaper' => false,
    ),
    'filters' => array(),
), 

Usage

Laravel-Haml registers the ".haml", ".haml.php", ".haml.blade", and ".haml.blade.php" extension with Laravel and forwards compile requests on to MtHaml. It compiles your Haml templates in the same way as Blade templates; the compiled template is put in app/storage/views. Thus, you don't suffer compile times on every page load., (*5)

In other words, just put your Haml files in the regular views directory and name them like "whatever.haml". You reference them in Laravel like normal:, (*6)

  • Laravel 4 : View::make('home.whatever') for app/views/home/whatever.haml
  • Laravel 5 : view('home.whatever') for resources/views/home/whatever.haml

The Haml view files can work side-by-side with regular PHP views. To use Blade templating within your Haml, just name the files with ".haml.blade" or ".haml.blade.php" extensions., (*7)

Histoy

Read the Github project releases for release notes., (*8)

The Versions

18/12 2017

dev-master

9999999-dev

Wraps MtHaml for ease use in Laravel

  Sources   Download

MIT

The Requires

 

by Robert Reinhard

18/12 2017

2.3.2

2.3.2.0

Wraps MtHaml for ease use in Laravel

  Sources   Download

MIT

The Requires

 

by Robert Reinhard

21/04 2015

2.3.1

2.3.1.0

Wraps MtHaml for ease use in Laravel

  Sources   Download

MIT

The Requires

 

by Robert Reinhard

15/04 2015

2.3.0

2.3.0.0

Wraps MtHaml for ease use in Laravel

  Sources   Download

MIT

The Requires

 

by Robert Reinhard

22/08 2014

2.2.0

2.2.0.0

Wraps MtHaml for ease use in Laravel

  Sources   Download

MIT

The Requires

 

by Robert Reinhard

27/06 2014

2.1.0

2.1.0.0

Wraps MtHaml for ease use in Laravel

  Sources   Download

MIT

The Requires

 

by Robert Reinhard

16/01 2014

2.0.0

2.0.0.0

Wraps MtHaml for ease use in Laravel

  Sources   Download

MIT

The Requires

 

by Robert Reinhard

18/12 2013

1.1.2

1.1.2.0

Wraps MtHaml for ease use in Laravel

  Sources   Download

MIT

The Requires

 

by Robert Reinhard

18/11 2013

1.1.1

1.1.1.0

Wraps MtHaml for ease use in Laravel

  Sources   Download

MIT

The Requires

 

by Robert Reinhard

15/11 2013

1.1.0

1.1.0.0

Wraps MtHaml for ease use in Laravel

  Sources   Download

MIT

The Requires

 

by Robert Reinhard

15/11 2013

1.0.0

1.0.0.0

Wraps MtHaml for ease use in Laravel

  Sources   Download

MIT

The Requires

 

by Robert Reinhard