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(6y 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 3w ago

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 72% 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

2132d 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

[moonshine/moonshine

Laravel administration panel

1.3k253.1k81](/packages/moonshine-moonshine)[tallstackui/tallstackui

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

725173.2k14](/packages/tallstackui-tallstackui)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M131](/packages/roots-acorn)[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45444.2k1](/packages/pressbooks-pressbooks)

PHPackages © 2026

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