PHPackages                             sura/view - 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. sura/view

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

sura/view
=========

The template engine.

3.1.0(3mo ago)0931MITPHPPHP ^8.4 || ^8.5CI passing

Since Jan 27Pushed 3mo agoCompare

[ Source](https://github.com/Sura-laboratory/sura-view)[ Packagist](https://packagist.org/packages/sura/view)[ RSS](/packages/sura-view/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (1)Versions (17)Used By (1)

Blade Template Engine
=====================

[](#blade-template-engine)

Sura\\View is a standalone version of Blade Template Engine that uses a single PHP file and can be ported and used in different projects. It allows you to use blade template outside Laravel.

Usage
-----

[](#usage)

If you use **composer**, then you could add the library using the next command (command line)

> composer require Sura/view

If you don't use it, then you could download the library and include it manually.

### Implicit definition

[](#implicit-definition)

```
use Sura\View\View;

$views = __DIR__ . '/views';
$cache = __DIR__ . '/cache';
$blade = new View($views,$cache,View::MODE_DEBUG); // MODE_DEBUG allows to pinpoint troubles.
echo $blade->run("hello",array("variable1"=>"value1")); // it calls /views/hello.blade.php
```

Where `$views` is the folder where the views (templates not compiled) will be stored. `$cache` is the folder where the compiled files will be stored.

In this example, the View opens the template **hello**. So in the views folder it should exist a file called \*\* hello.blade.php\*\*

views/hello.blade.php:

```
Title
{{$variable1}}
```

SVG Support
-----------

[](#svg-support)

The package now supports inline SVG rendering via the `@svg` directive.

### Usage

[](#usage-1)

```
@svg('icon-name', ['class' => 'icon', 'width' => 24, 'height' => 24])
```

This will render the SVG from `public/assets/svg/icon-name.svg` with the specified attributes.

You can customize the default SVG directory by setting:

```
$blade->svgDirectory = '/path/to/svg';
```

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance81

Actively maintained with recent releases

Popularity9

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 56.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 ~0 days

Total

15

Last Release

102d ago

Major Versions

2.1.5 → 3.0.02026-01-31

PHP version history (2 changes)2.1.1PHP ^8.5

2.1.2PHP ^8.4 || ^8.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/6cdac9e4390ea15486f926c4a89f4c02020954be51c17d5886299b5b83d75ecf?d=identicon)[semyon492](/maintainers/semyon492)

---

Top Contributors

[![SegFaultCharmer](https://avatars.githubusercontent.com/u/247147113?v=4)](https://github.com/SegFaultCharmer "SegFaultCharmer (17 commits)")[![t0nipit](https://avatars.githubusercontent.com/u/257520440?v=4)](https://github.com/t0nipit "t0nipit (12 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

---

Tags

phpbladetemplatetemplatingview

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/sura-view/health.svg)

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

###  Alternatives

[eftec/bladeone

The standalone version Blade Template Engine from Laravel in a single php file

8208.4M87](/packages/eftec-bladeone)[eftec/bladeonehtml

The standalone version Blade Template Engine from Laravel in a single php file

1018.1k5](/packages/eftec-bladeonehtml)

PHPackages © 2026

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