PHPackages                             vusys/laravel-smarty - 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. vusys/laravel-smarty

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

vusys/laravel-smarty
====================

Replace Blade with Smarty as the default Laravel template engine.

v0.22.0(2w ago)026MITPHPPHP ^8.1CI passing

Since May 1Pushed 2w agoCompare

[ Source](https://github.com/Vusys/laravel-smarty)[ Packagist](https://packagist.org/packages/vusys/laravel-smarty)[ Docs](https://vusys.github.io/laravel-smarty/)[ RSS](/packages/vusys-laravel-smarty/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (10)Dependencies (36)Versions (49)Used By (0)

vusys/laravel-smarty
====================

[](#vusyslaravel-smarty)

[![Latest Version on Packagist](https://camo.githubusercontent.com/60eb004ae813540cab19a3f2d8f3253cc3758e5243e2f6ccc773bbe98576cf41/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f76757379732f6c61726176656c2d736d617274792e737667)](https://packagist.org/packages/vusys/laravel-smarty)[![Total Downloads](https://camo.githubusercontent.com/f9c17d208f211e9f23cf5e097b44d053ddaea1086846304f74c7bf922326d7b2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f76757379732f6c61726176656c2d736d617274792e737667)](https://packagist.org/packages/vusys/laravel-smarty)[![Tests](https://github.com/Vusys/laravel-smarty/actions/workflows/tests.yml/badge.svg)](https://github.com/Vusys/laravel-smarty/actions/workflows/tests.yml)[![codecov](https://camo.githubusercontent.com/71eb4ffe778f2810dada58f4739f3942c5ded3074d11658435341e9464ab57e6/68747470733a2f2f636f6465636f762e696f2f67682f56757379732f6c61726176656c2d736d617274792f67726170682f62616467652e737667)](https://codecov.io/gh/Vusys/laravel-smarty)[![Mutation testing](https://camo.githubusercontent.com/9004a5e51fe006f33364628f61e97437e47534cf2fb374bcaacdfd8f1fe0108e/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f7374796c653d666c61742675726c3d68747470733a2f2f62616467652d6170692e737472796b65722d6d757461746f722e696f2f6769746875622e636f6d2f56757379732f6c61726176656c2d736d617274792f6d6173746572)](https://dashboard.stryker-mutator.io/reports/github.com/Vusys/laravel-smarty/master)[![tests](https://camo.githubusercontent.com/b4c2a8b3d53c06b4bb3ced77c0a84d73a723653c52d6efb57f4cdee060210d4b/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f75726c3d68747470733a2f2f7261772e67697468756275736572636f6e74656e742e636f6d2f56757379732f6c61726176656c2d736d617274792f6261646765732f74657374732e6a736f6e)](https://github.com/Vusys/laravel-smarty/actions/workflows/tests.yml) [![assertions](https://camo.githubusercontent.com/b0e03257a245d47b55820d825ea9df36260085d4869d4cf17afe6f7b2380baef/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f75726c3d68747470733a2f2f7261772e67697468756275736572636f6e74656e742e636f6d2f56757379732f6c61726176656c2d736d617274792f6261646765732f617373657274696f6e732e6a736f6e)](https://github.com/Vusys/laravel-smarty/actions/workflows/tests.yml) [![test LOC](https://camo.githubusercontent.com/8e6dbe243bf7adeb56bc2cfacc21c5883843c73ea5e1be20744014eca56dbcd4/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f75726c3d68747470733a2f2f7261772e67697468756275736572636f6e74656e742e636f6d2f56757379732f6c61726176656c2d736d617274792f6261646765732f746573742d726174696f2e6a736f6e)](tests/) [![CI matrix](https://camo.githubusercontent.com/c463380b4f0976cb08101c82c7fe47f3fc0f50cdb4cf172bff937fa912534f8b/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f75726c3d68747470733a2f2f7261772e67697468756275736572636f6e74656e742e636f6d2f56757379732f6c61726176656c2d736d617274792f6261646765732f6d61747269782e6a736f6e)](.github/workflows/tests.yml)[![PHP](https://camo.githubusercontent.com/b3ed86f95df7195fcde91d7dc7c9ffdcd821f813cbd1726b94bd80fd5568387f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253545382e312d3737374242343f6c6f676f3d706870266c6f676f436f6c6f723d7768697465)](composer.json)[![Laravel](https://camo.githubusercontent.com/55604c13998385ec29445a4b4a1be01e0ce7337b47aa910f13ae3d4a37c477be/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c61726176656c2d31302532302537432532303131253230253743253230313225323025374325323031332d4646324432303f6c6f676f3d6c61726176656c)](composer.json)[![PHPStan](https://camo.githubusercontent.com/1bc07920f0d36e55c17e1d38b1caa132cc605f51a82b388c962870b9a747b898/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d6c6576656c253230392d627269676874677265656e2e737667)](phpstan.neon)[![Rector](https://camo.githubusercontent.com/9286512bc0762af8c37418ae625e9977502194b51f89609b24bcfef6e1ba5575/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f526563746f722d70617373696e672d627269676874677265656e2e737667)](rector.php)[![Code Style: Pint](https://camo.githubusercontent.com/7c8875633cb083fe4b31e4f2e2cb344b2ac42ebfa56ba5b2bf5f84f9cc4af64d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f64652532307374796c652d4c61726176656c25323050696e742d4646324432302e7376673f6c6f676f3d6c61726176656c)](https://github.com/laravel/pint)[![License](https://camo.githubusercontent.com/8bb50fd2278f18fc326bf71f6e88ca8f884f72f179d3e555e20ed30157190d0d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e2e737667)](LICENSE)

Replace Blade with [Smarty 5](https://www.smarty.net/) as the default view engine in a Laravel application.

**📚 Full documentation: [vusys.github.io/laravel-smarty](https://vusys.github.io/laravel-smarty/)**

Requirements
------------

[](#requirements)

- PHP `^8.1`
- Laravel `^10 | ^11 | ^12 | ^13`
- `smarty/smarty` `^5.4`

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

[](#installation)

```
composer require vusys/laravel-smarty
```

The service provider is registered automatically via package discovery.

Publish the config (optional):

```
php artisan vendor:publish --tag=smarty-config
```

That writes `config/smarty.php`.

To customise the bundled paginator templates, publish them with:

```
php artisan vendor:publish --tag=smarty-pagination-views
```

That copies the `pagination::*` presets (Tailwind, Bootstrap 3/4/5, Semantic UI, and their simple variants) into `resources/views/vendor/pagination/`, where your edits override both the package's bundled `.tpl` and Laravel's framework Blade views. See [docs/pagination.md](docs/pagination.md) for details.

Quick start
-----------

[](#quick-start)

Create `resources/views/welcome.tpl`:

```

{$title}

  Hello, {$name}!

```

`{$var}` output is HTML-escaped automatically (`escape_html` is on by default), matching Blade's `{{ }}` — no `|escape` needed. Use `{$var nofilter}` where you deliberately want raw output.

Render it like any Laravel view:

```
Route::get('/', fn () => view('welcome', [
    'title' => 'Home',
    'name'  => 'World',
]));
```

Smarty resolves before Blade, so a `welcome.tpl` overrides an existing `welcome.blade.php` for the same view name.

Documentation
-------------

[](#documentation)

TopicWhat's in it[Overview](docs/overview.md)Why this package exists; how the Smarty bridge plugs into Laravel's view machinery.[Quick start](docs/quick-start.md)First template, route, and a `{extends}` inheritance example.[Configuration](docs/configuration.md)Every `config/smarty.php` key, plus the `SmartyFactory::configure()` hook for advanced wiring.[Security policy](docs/security.md)The shipped Balanced / Strict policies and when to use each.[Built-in plugins](docs/plugins.md)`{auth}`, `{can}`, `{feature}`, `{route}`, `{lang}`, `{vite}`, number modifiers, and the rest.[Auto-shared wrapper objects](docs/wrapper-objects.md)`$auth`, `$request`, `$session`, `$route`, `$errors` and their reserved-key behaviour.[Pagination](docs/pagination.md)Bundled paginator presets and how to publish them.[Custom plugins](docs/custom-plugins.md)File-based plugins, class-backed discovery, and the discovery cache.[Artisan commands](docs/artisan.md)`smarty:optimize`, the clear-\* commands, and the plugin discovery cache commands.[Laravel integration](docs/laravel-integration.md)View composers, Debugbar/Telescope, and `.tpl` source-line error mapping.[Troubleshooting](docs/troubleshooting.md)Stale compiles after deploys, `ReservedTemplateVariable`, escaping surprises, Octane notes.[Development](docs/development.md)Running tests, static analysis, code style.License
-------

[](#license)

MIT.

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance96

Actively maintained with recent releases

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88.1% 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 ~2 days

Recently: every ~8 days

Total

35

Last Release

17d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4213522?v=4)[Bryan](/maintainers/Vusys)[@Vusys](https://github.com/Vusys)

---

Top Contributors

[![Vusys](https://avatars.githubusercontent.com/u/4213522?v=4)](https://github.com/Vusys "Vusys (96 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (13 commits)")

---

Tags

laravelbladetemplatetemplatingviewsmartytemplate engine

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/vusys-laravel-smarty/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.3M347](/packages/psalm-plugin-laravel)[moonshine/moonshine

Laravel administration panel

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

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

728176.2k14](/packages/tallstackui-tallstackui)[blade-ui-kit/blade-icons

A package to easily make use of icons in your Laravel Blade views.

2.5k42.5M423](/packages/blade-ui-kit-blade-icons)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M133](/packages/roots-acorn)[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)
