PHPackages                             ricardosierra/laravel-haml - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. ricardosierra/laravel-haml

ActiveLibrary[Templating &amp; Views](/categories/templating)

ricardosierra/laravel-haml
==========================

Wraps MtHaml for ease use in Laravel

2.4.2(5y ago)14.5k2MITPHPPHP ^7.0

Since Nov 15Pushed 5y agoCompare

[ Source](https://github.com/ricardosierra/laravel-haml)[ Packagist](https://packagist.org/packages/ricardosierra/laravel-haml)[ RSS](/packages/ricardosierra-laravel-haml/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (3)Versions (15)Used By (2)

Laravel Haml
============

[](#laravel-haml)

[![Packagist](https://camo.githubusercontent.com/5d924c0c4f691ce6fc5ada667090768a59a8e314d7c5aeeac0339e0ee11a9fed/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f626b776c642f6c61726176656c2d68616d6c2e737667)](https://packagist.org/packages/bkwld/laravel-haml)

A small package that adds support for compiling Haml templates to Laravel via [MtHaml](https://github.com/arnaud-lb/MtHaml). Both vanilla php and [Blade syntax](http://laravel.com/docs/5.0/templates#blade-templating) is supported within the Haml.

Installation
------------

[](#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
-------------

[](#configuration)

You can set [MtHaml](https://github.com/arnaud-lb/MtHaml) environment, options, and filters manually. To do so:

- **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:

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

```

Usage
-----

[](#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.

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:

- **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.

Histoy
------

[](#histoy)

Read the Github [project releases](https://github.com/BKWLD/laravel-haml/releases) for release notes.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 66.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~191 days

Recently: every ~19 days

Total

14

Last Release

2078d ago

Major Versions

1.1.2 → 2.0.02014-01-16

PHP version history (2 changes)1.0.0PHP &gt;=5.3.0

2.4.1PHP ^7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/c0a11577f9e4f7db7533432c22786439b3155ec7bc06be9760be7260c4ce1e0d?d=identicon)[ricardosierra](/maintainers/ricardosierra)

---

Top Contributors

[![weotch](https://avatars.githubusercontent.com/u/77567?v=4)](https://github.com/weotch "weotch (24 commits)")[![benallfree](https://avatars.githubusercontent.com/u/1068356?v=4)](https://github.com/benallfree "benallfree (5 commits)")[![ricardosierra](https://avatars.githubusercontent.com/u/5499444?v=4)](https://github.com/ricardosierra "ricardosierra (3 commits)")[![tomcoonen](https://avatars.githubusercontent.com/u/988013?v=4)](https://github.com/tomcoonen "tomcoonen (2 commits)")[![josuebasurto](https://avatars.githubusercontent.com/u/332079?v=4)](https://github.com/josuebasurto "josuebasurto (1 commits)")[![pvos](https://avatars.githubusercontent.com/u/7125411?v=4)](https://github.com/pvos "pvos (1 commits)")

### Embed Badge

![Health badge](/badges/ricardosierra-laravel-haml/health.svg)

```
[![Health](https://phpackages.com/badges/ricardosierra-laravel-haml/health.svg)](https://phpackages.com/packages/ricardosierra-laravel-haml)
```

###  Alternatives

[rcrowe/twigbridge

Adds the power of Twig to Laravel

9105.9M50](/packages/rcrowe-twigbridge)[tightenco/jigsaw

Simple static sites with Laravel's Blade.

2.2k438.5k29](/packages/tightenco-jigsaw)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[moonshine/moonshine

Laravel administration panel

1.3k217.1k59](/packages/moonshine-moonshine)[livewire/blaze

A tool for optimizing Blade component performance by folding them into parent templates

688221.3k17](/packages/livewire-blaze)[tallstackui/tallstackui

TallStackUI is a powerful suite of Blade components that elevate your workflow of Livewire applications.

703141.0k7](/packages/tallstackui-tallstackui)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
