PHPackages                             evertt/slade - 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. evertt/slade

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

evertt/slade
============

A templating for Laravel inspired by Ruby Slim and Laravel Blade

421775[3 issues](https://github.com/Evertt/Slade/issues)PHP

Since Aug 20Pushed 10y ago4 watchersCompare

[ Source](https://github.com/Evertt/Slade)[ Packagist](https://packagist.org/packages/evertt/slade)[ RSS](/packages/evertt-slade/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Slade
=====

[](#slade)

A PHP templating engine inspired by both Ruby Slim and Laravel Blade

Disclaimer
==========

[](#disclaimer)

I want to let you know that I don't believe this code is production ready yet. It's missing features to make it really powerful and although I've written tests I'm sure there are probably still important bugs I've missed. What I would really like is if you'd like to test it, look at the code and send me suggestions and pull-requests to make it better.

Install
-------

[](#install)

Use

```
composer require evertt/slade

```

to include this package into your Laravel project. Then in `config/app.php` add `Slade\ServiceProvider::class` to your list of service providers.

Usage
-----

[](#usage)

To use this engine all you need to do is create template files that end in `.slade.php` instead of `.blade.php`.

Example
-------

[](#example)

The following template

```
doctype html
html
  head
    title Slade
    link href="style.css"

    css:
      body {
        color: #333;
      }

  body
    h1 My first Slade template!

    ? $name
      p
        | Hello $name, this line only appears
        | if the name variable contains a truthy.

    ! $name
      p There is no name.

    div

        It also works fine with just plain html.

    h2 Here is a list of names of people:
    ul
      > $people
        li = $person->name

    + elements.footer

```

Could parse into the following HTML:

```
>

    Slade

      body {
        color: #333;
      }

    My first Slade template!

      Hello John Doe, this line only appears
      if the name variable contains a truthy.

        It also works fine with just plain html.

    Here is a list of names of people:

      Harry
      Ron
      Hermione

      &copy; Me 2015

```

You can also extend another template this way:

```
_ layouts.default
  @ content
    p This paragraph will be assigned to the 'content' section

```

Which will then extend for example `layouts/default.slade.php` and the paragraph will appear wherever the following line is included in `layouts/default.slade.php`:

```
- content

```

Inserting variables
-------------------

[](#inserting-variables)

As you saw, you can insert variables in a few ways. I want to show a few more.

```
p
  | So this is a block of text in which you can put variables.
    You can do that in the following manner:
    $var or {$var} or ${var}. The {} syntax only works if
    there's no whitespace after the { and before the } though.
    And finally you can also execute function calls like so:
    {implode(' ', $var)}. Again, make sure there's no whitespace
    immediately following the { or immediately preceding the }.

```

More
----

[](#more)

There's a lot more you can do. I intend to write a more complete wiki about it soon. If you'd like to contribute to the docs or the code or suggest any features then please file an issue or submit a pull-request. That would be the greatest gift for me.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 98.5% 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.

### Community

Maintainers

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

---

Top Contributors

[![Evertt](https://avatars.githubusercontent.com/u/1267282?v=4)](https://github.com/Evertt "Evertt (67 commits)")[![ChristopherMoll](https://avatars.githubusercontent.com/u/3216891?v=4)](https://github.com/ChristopherMoll "ChristopherMoll (1 commits)")

### Embed Badge

![Health badge](/badges/evertt-slade/health.svg)

```
[![Health](https://phpackages.com/badges/evertt-slade/health.svg)](https://phpackages.com/packages/evertt-slade)
```

###  Alternatives

[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[whitecube/nova-flexible-content

Flexible Content &amp; Repeater Fields for Laravel Nova.

8053.0M25](/packages/whitecube-nova-flexible-content)[mopa/bootstrap-bundle

Easy integration of twitters bootstrap into symfony2

7042.9M33](/packages/mopa-bootstrap-bundle)[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3871.2M](/packages/limenius-react-bundle)[nicmart/string-template

StringTemplate is a very simple string template engine for php. I've written it to have a thing like sprintf, but with named and nested substutions.

2101.7M30](/packages/nicmart-string-template)[symfony/ux-icons

Renders local and remote SVG icons in your Twig templates.

555.8M69](/packages/symfony-ux-icons)

PHPackages © 2026

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