PHPackages                             keepsuit/laravel-liquid - 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. keepsuit/laravel-liquid

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

keepsuit/laravel-liquid
=======================

Liquid template engine for Laravel

v0.6.0(2w ago)911.1k↑46.4%MITPHPPHP ^8.2CI passing

Since Sep 5Pushed 1w ago2 watchersCompare

[ Source](https://github.com/keepsuit/laravel-liquid)[ Packagist](https://packagist.org/packages/keepsuit/laravel-liquid)[ Docs](https://github.com/keepsuit/laravel-liquid)[ RSS](/packages/keepsuit-laravel-liquid/feed)WikiDiscussions main Synced today

READMEChangelog (10)Dependencies (15)Versions (19)Used By (0)

Liquid template engine for Laravel
==================================

[](#liquid-template-engine-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/f57da7577e6e95e697ee3de32ec860d44c6c8d4b1df8fdb45a99b2430c68f115/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b656570737569742f6c61726176656c2d6c69717569642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/keepsuit/laravel-liquid)[![GitHub Tests Action Status](https://camo.githubusercontent.com/0d894ab6a1555a3c9923e89c722841ad522cec902865ff31f2dc6df61523622d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6b656570737569742f6c61726176656c2d6c69717569642f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/keepsuit/laravel-liquid/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/dd2b63a4615080fedeeb31c1378ea9aa7a5f5ed98cbeec73b91acaf52decfcc1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6b656570737569742f6c61726176656c2d6c69717569642f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/keepsuit/laravel-liquid/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/1883bdeeac869c079059e5c55e17fe1658b7fdd63af78b72f5a6ec82542efd6f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b656570737569742f6c61726176656c2d6c69717569642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/keepsuit/laravel-liquid)

This is a Laravel view integration of the Shopify Liquid template engine. It uses [keepsuit/liquid](https://github.com/keepsuit/php-liquid) PHP porting under the hood to parse liquid templates.

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

[](#installation)

You can install the package via composer:

```
composer require keepsuit/laravel-liquid
```

Usage
-----

[](#usage)

1. Create a liquid template file in `resources/views` folder (for example `home.liquid`).
2. Render the template as usual with Laravel view engine.

```
class HomeController extends Controller
{
    public function index()
    {
        return view('home');
    }
}
```

Tags
----

[](#tags)

This package provides some custom tags in addition to the standard Liquid tags.

### Auth

[](#auth)

Check if the user is authenticated. Same as laravel [`@auth`](https://laravel.com/docs/blade#authentication-directives) directive.

```
{% auth %}
user is authenticated
{% endauth %}

{% guest %}
user is not authenticated
{% endguest %}
```

or with custom guard

```
{% auth('admin') %}
admin is authenticated
{% endauth %}

{% guest 'admin' %}
admin is not authenticated
{% endguest %}
```

### Env

[](#env)

Check if the application environment is the specified one. Same as laravel [`@env`](https://laravel.com/docs/blade#environment-directives) directive.

```
{% env 'production' %}
application is in production environment
{% endenv %}
```

### Session

[](#session)

Check if the session has a specific key. Same as laravel [`@session`](https://laravel.com/docs/blade#session-directives) directive. The value of the session key can be accessed with the `value` variable.

```
{% session 'status' %}

  {{ value }}

{% endsession %}
```

### Error

[](#error)

Check if a validation error exists for the given field. Same as laravel [`@error`](https://laravel.com/docs/blade#validation-errors) directive. The error message can be accessed with the `message` variable.

```
{% error 'email' %}

  {{ message }}

{% enderror %}
```

### Csrf field

[](#csrf-field)

Generate a hidden CSRF token form field. Same as laravel [`@csrf`](https://laravel.com/docs/blade#csrf-field) directive.

```

  {% csrf %}
  ...

```

### Vite

[](#vite)

Adds your vite assets to the template. Same as laravel [`@vite`](https://laravel.com/docs/vite#loading-your-scripts-and-styles) directive.

```
{% vite 'resources/css/app.css', 'resources/js/app.js' %}

{% comment %}With custom build directory{% endcomment %}
{% vite "resources/js/app.js", directory: "custom" %}
```

Filters
-------

[](#filters)

This package provides some custom filters in addition to the standard Liquid filters.

### Debug

[](#debug)

Debug variable content with `dump` and `dd` filters.

```
{{ variable | dump }}

{{ variable | dd }}
```

### Localization

[](#localization)

Translate a string with `trans` (or `t` alias) and `trans_choice` filters using the Laravel localization system.

```
{{ 'messages.welcome' | trans }}

{{ 'messages.items_count' | trans_choice: 3 }}
```

### Url

[](#url)

Generate urls using the laravel url helpers.

```
{{ 'app.js' | asset }}
{{ 'app.js' | secure_asset }}

{{ '/home' | url }}
{{ '/home' | secure_url }}

{{ 'home' | route }}
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Credits
-------

[](#credits)

- [Fabio Capucci](https://github.com/keepsuit)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

52

—

FairBetter than 97% of packages

Maintenance97

Actively maintained with recent releases

Popularity32

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 81.3% 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 ~65 days

Recently: every ~88 days

Total

15

Last Release

20d ago

PHP version history (2 changes)v0.1.0PHP ^8.1

v0.6.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/9881c8ffdbe3f838feabbfba94c7a602db2bd84f991913a75cbfd1e21c593e66?d=identicon)[cappuc](/maintainers/cappuc)

---

Top Contributors

[![cappuc](https://avatars.githubusercontent.com/u/4271608?v=4)](https://github.com/cappuc "cappuc (126 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (19 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (10 commits)")

---

Tags

laravelliquidkeepsuit

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/keepsuit-laravel-liquid/health.svg)

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

###  Alternatives

[yungifez/artisan-ui

A livewire blade UI component library

3014.1k](/packages/yungifez-artisan-ui)

PHPackages © 2026

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