PHPackages                             bkwld/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. bkwld/laravel-haml

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

bkwld/laravel-haml
==================

Wraps MtHaml for ease use in Laravel

2.5.0(5y ago)4442.5k↓50%10[5 issues](https://github.com/BKWLD/laravel-haml/issues)1MITPHPPHP &gt;=5.3.0

Since Nov 15Pushed 5y ago12 watchersCompare

[ Source](https://github.com/BKWLD/laravel-haml)[ Packagist](https://packagist.org/packages/bkwld/laravel-haml)[ RSS](/packages/bkwld-laravel-haml/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (9)Dependencies (3)Versions (13)Used By (1)

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

39

—

LowBetter than 86% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity39

Limited adoption so far

Community22

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 71.4% 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 ~236 days

Recently: every ~521 days

Total

12

Last Release

1959d ago

Major Versions

1.1.2 → 2.0.02014-01-16

### Community

Maintainers

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

---

Top Contributors

[![weotch](https://avatars.githubusercontent.com/u/77567?v=4)](https://github.com/weotch "weotch (25 commits)")[![benallfree](https://avatars.githubusercontent.com/u/1068356?v=4)](https://github.com/benallfree "benallfree (5 commits)")[![petrenkorf](https://avatars.githubusercontent.com/u/3410105?v=4)](https://github.com/petrenkorf "petrenkorf (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)")[![tomcoonen](https://avatars.githubusercontent.com/u/988013?v=4)](https://github.com/tomcoonen "tomcoonen (1 commits)")

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/bkwld-laravel-haml/health.svg)](https://phpackages.com/packages/bkwld-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)
