PHPackages                             pafnuty/laravel-fenom - 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. pafnuty/laravel-fenom

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

pafnuty/laravel-fenom
=====================

Fenom Template Engine for Laravel 5

v1.0.0(10y ago)5803[2 issues](https://github.com/fenom-template/Laravel.Fenom/issues)MITPHPPHP &gt;=5.4.0

Since May 30Pushed 10y ago4 watchersCompare

[ Source](https://github.com/fenom-template/Laravel.Fenom)[ Packagist](https://packagist.org/packages/pafnuty/laravel-fenom)[ RSS](/packages/pafnuty-laravel-fenom/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (6)Versions (7)Used By (0)

Laravel.Fenom
=============

[](#laravelfenom)

[![Join the chat at https://gitter.im/pafnuty/Laravel.Fenom](https://camo.githubusercontent.com/abe08b740a4156153736f791393ec4da6619c4be73212e75769f52edacc0e2b5/68747470733a2f2f6261646765732e6769747465722e696d2f4a6f696e253230436861742e737667)](https://gitter.im/fenom-template/Laravel.Fenom?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

Fenom Template Engine for Laravel 5

Bringing [Fenom](https://github.com/fenom-template/fenom) to Laravel 5 using the new [Contracts Package](https://github.com/illuminate/contracts).

\##Installation

In the require key of composer.json file add the following

```
"pafnuty/laravel-fenom": "1.*"

```

Run the Composer update command

```
$ composer update

```

Run command

```
$ php artisan clear-compiled

```

In your **config/app.php** add `'Pafnuty\Fenom\FenomViewServiceProvider',` to the end of the `providers` array **and comment** the `'Illuminate\View\ViewServiceProvider'` provider. Like this:

```
'providers' => [
    ...
    'Illuminate\Validation\ValidationServiceProvider',
    //'Illuminate\View\ViewServiceProvider',
    ...
    'Pafnuty\Fenom\FenomViewServiceProvider',
]
```

Run the `artisan vendor:publish` command

```
$ php artisan vendor:publish --provider="Pafnuty\Fenom\FenomViewServiceProvider"

```

Will be published with the default views and the configuration file.

Configuration
-------------

[](#configuration)

Config file available in the folder `config/view-fenom.php`. Views by default have a structure similar to the structure of the blade for easier transition to new template engine in a new project.

Use
---

[](#use)

If you use the setting `'controller_syntax' => 'blade'`, changes to the controllers do not need to make.

If setting `'controller_syntax' => 'fenom'` calling view in controller will be like this:

```
public function index() {
    return view('myfolder/welcome.tpl');
}
```

Syntax
------

[](#syntax)

Fenom — this is a very quick and easy template engine! With easy syntax, similar to Smarty Template Engine.

Control Structures
------------------

[](#control-structures)

### If Statements

[](#if-statements)

```
{if $records|length === 1)
    I have one record!
{elseif $records| length > 1}
    I have multiple records!
{else}
    I don't have any records!
{/if}
```

### Loops

[](#loops)

```
{for ($i = 0 to = 10)
    The current value is {$i}
{forelse}
    No values
{/for}

{foreach $list as $key => $value}
    {$key}: {$value}
{foreachelse}
    Empty
{/foreach}
```

### Including Sub-Views

[](#including-sub-views)

```
{include 'auth/errors.tpl' foo='bar'}
or
{insert 'auth/errors.tpl'}

```

### Overwriting Sections

[](#overwriting-sections)

```
{* in app.tpl: *}
{block 'content'} text {/block}

{* in home.tpl: *}
{extends 'app.tpl'}
{block 'content'} home-text {/block}

{* in browser: *}
home-text

```

### Comments

[](#comments)

```
{* This comment will not be in the rendered HTML  *}

```

### Errors

[](#errors)

```
{set $errors = $.errors}

{if $errors->any()}
    {foreach $errors->all() as $error}
        {$error}
    {/foreach}
{/if}

```

### App

[](#app)

```
{set $App = $.app}

{$App::someMethodName()}

```

More usage examples can be found on the Fenom documentation pages

- [English docs](https://github.com/fenom-template/fenom/blob/master/docs/en/readme.md)
- [Russian docs](https://github.com/fenom-template/fenom/blob/master/docs/ru/readme.md)

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance12

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 75% 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 ~1 days

Total

5

Last Release

4002d ago

Major Versions

v0.4.0 → v1.0.02015-06-03

### Community

Maintainers

![](https://www.gravatar.com/avatar/47580fa28a7dde76fbc424c334fcc3c5b78a9ab08082364d54db3133d37286d4?d=identicon)[pafnuty](/maintainers/pafnuty)

---

Top Contributors

[![pafnuty](https://avatars.githubusercontent.com/u/1635679?v=4)](https://github.com/pafnuty "pafnuty (21 commits)")[![maxisoft-git](https://avatars.githubusercontent.com/u/2070199?v=4)](https://github.com/maxisoft-git "maxisoft-git (6 commits)")[![gitter-badger](https://avatars.githubusercontent.com/u/8518239?v=4)](https://github.com/gitter-badger "gitter-badger (1 commits)")

---

Tags

laraveltemplateviewfenom

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/pafnuty-laravel-fenom/health.svg)

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

###  Alternatives

[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[jenssegers/blade

The standalone version of Laravel's Blade templating engine for use outside of Laravel.

8661.2M109](/packages/jenssegers-blade)[ytake/laravel-smarty

Smarty template engine for Laravel and Lumen

87401.6k](/packages/ytake-laravel-smarty)[leitsch/kirby-blade

Enable Laravel Blade Template Engine for Kirby 4 and Kirby 5

219.2k](/packages/leitsch-kirby-blade)

PHPackages © 2026

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