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

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

gears/view
==========

Laravel Sessions Standalone

v0.2.0(11y ago)422011MITPHP

Since Sep 20Pushed 7y ago1 watchersCompare

[ Source](https://github.com/phpgearbox/view)[ Packagist](https://packagist.org/packages/gears/view)[ Docs](https://github.com/phpgearbox/view)[ RSS](/packages/gears-view/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (6)Versions (3)Used By (1)

> Looking for maintainers, I no longer do much if any PHP dev, I have moved on, mostly work in dotnet core, node.js &amp; golang these days. If anyone is keen to take over these projects, get in touch -

The Blade View Gear
===================

[](#the-blade-view-gear)

[![Build Status](https://camo.githubusercontent.com/9c1692a707c2356594abc605c65d91d797eb28087cfa89679bafd03615d379bf/68747470733a2f2f7472617669732d63692e6f72672f70687067656172626f782f766965772e737667)](https://travis-ci.org/phpgearbox/view)[![Latest Stable Version](https://camo.githubusercontent.com/d1d25675f0786631686b26e9e1c534753a970248f12a45e67c00256d5c0eb98a/68747470733a2f2f706f7365722e707567782e6f72672f67656172732f766965772f762f737461626c652e737667)](https://packagist.org/packages/gears/view)[![Total Downloads](https://camo.githubusercontent.com/02b6b74e8e1fe2bd151a105bf20f5880e63839fd127bcd4e3ab090bdb4c806ca/68747470733a2f2f706f7365722e707567782e6f72672f67656172732f766965772f646f776e6c6f6164732e737667)](https://packagist.org/packages/gears/view)[![License](https://camo.githubusercontent.com/ba0fe65c9cc7494de5069dee6b620831fc45ca5030a35647e8c2d542a6aeaef6/68747470733a2f2f706f7365722e707567782e6f72672f67656172732f766965772f6c6963656e73652e737667)](https://packagist.org/packages/gears/view)

**Laravel Blade Views Standalone**

Okay so by now hopefully you have heard of [Laravel](http://laravel.com/), the PHP framework that just makes things easy. So first things first full credit goes to [Taylor Otwell](https://github.com/taylorotwell) for the Blade API.

How to Install
--------------

[](#how-to-install)

Installation via composer is easy:

```
composer require gears/view:*

```

How to Use
----------

[](#how-to-use)

In your *legacy* - non Laravel application. You can use the Laravel Blade API like so:

```
// Make sure you have composer included
require('vendor/autoload.php');

// Create a new View Instance
$views = new Gears\View('/path/to/my/views');

// Next you will probably want to make the view object global.
$views->globalise();
```

And thats it, now you can use code like the following:

```
echo View::make('greeting', array('name' => 'Brad'));
```

Where the view might look like:

```

        Hello,

```

For more info on the View API it's self see:

View Scope
----------

[](#view-scope)

When you run `$views->globalise();` it checks to see if the class `View`exists globally. If not it use the function `class_alias` to alias it's self in much the same a Laravel Application does.

This enables us to use the `View` API we are familar with.

View Include Path:
------------------

[](#view-include-path)

You can provide an array of paths, instead of just one path. So in effect you can have a View Include Path. Very handy for setting up a HMVC type system. Here is an example:

```
$views = new Gears\View(['/views/specific', '/views/generic']);
```

So now for the why?
-------------------

[](#so-now-for-the-why)

While laravel is so awesomely cool and great. If you want to pull a feature out and use it in another project it can become difficult. Firstly you have to have an innate understanding of the [IoC Container](http://laravel.com/docs/ioc).

You then find that this class needs that class which then requires some other config variable that is normally present in the IoC when run inside a normal Laravel App but in your case you haven't defined it and don't really want to define that value because it makes no sense in your lets say *legacy*application.

Perfect example is when I tried to pull the session API out to use in wordpress. It wanted to know about a `booted` method, which I think comes from `Illuminate\Foundation\Application`. At this point in time I already had to add various other things into the IoC to make it happy and it was the last straw that broke the camels back, I chucked a coders tantrum, walked to the fridge, grabbed another Redbull and sat back down with a new approach.

The result is this project.

---

Developed by Brad Jones -

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~12 days

Total

2

Last Release

4245d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2b476564958ffc91db5580080738e529644f820bdfec6a6c4d397f9c5da45065?d=identicon)[brad-jones](/maintainers/brad-jones)

---

Top Contributors

[![brad-jones](https://avatars.githubusercontent.com/u/2754772?v=4)](https://github.com/brad-jones "brad-jones (7 commits)")

---

Tags

laravelbladestandaloneviews

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[philo/laravel-blade

Use the simple and yet powerful Laravel Blade templating engine as a standalone component.

354673.2k59](/packages/philo-laravel-blade)

PHPackages © 2026

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