PHPackages                             xy2z/blader - 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. xy2z/blader

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

xy2z/blader
===========

A lightweight template router

1.1.5(7y ago)222MITHTML

Since Sep 15Pushed 7y ago1 watchersCompare

[ Source](https://github.com/xy2z/Blader)[ Packagist](https://packagist.org/packages/xy2z/blader)[ RSS](/packages/xy2z-blader/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (1)Versions (9)Used By (0)

Blader
======

[](#blader)

A lightweight template router - for websites with no/minimal dynamic needs.

Using [BladeOne](https://github.com/EFTEC/BladeOne/) - a standalone version of Laravel's blade template engine.

Install
-------

[](#install)

```
composer create-project xy2z/blader mysite
cd mysite/public
php -S 127.0.0.1:81

```

Go to

### Requirements

[](#requirements)

- PHP 7.0 or above.

Basic Usage
-----------

[](#basic-usage)

```
require '../vendor/xy2z/blader-core/src/init.php';

$blader->addRoute('GET', '/', 'home'); // Renders '../views/home.blade.php'
$blader->addRoute('GET', '/about', 'about'); // Renders '../views/about.blade.php'

$blader->not_found_view = '404'; // Renders '../views/404.blade.php' on 404.

$blader->render();
```

That's it.

Features
--------

[](#features)

#### Global variables

[](#global-variables)

In your `/public/index.php`, add:

```
$blader->global_vars = [
	'foo' => 'bar',
];
```

#### Config

[](#config)

A default config file is added in `config/app.php`. You can delete this if you don't need it.

You can add as many files here as you want. `PHP`, `INI` and `JSON` files are supported.

You can access the config everywhere by calling `Config::get('filename.key')`.

Use `Config::get('app.name')` to access the `name` key in `config/app.php`:

#### Route specific headers

[](#route-specific-headers)

```
$blader->addRoute('GET', '/rss', 'rss', function() {
	header('Content-type: application/rss+xml; charset=utf-8');
});
```

#### Adding route specific variables

[](#adding-route-specific-variables)

```
$blader->addRoute('GET', '/rss', 'rss', function() {
	// Return all variables you want in the view.
	return [
		'foo' => 'bar',
	];
});

// 'views/rss.blade.php' can now print $foo
```

Credits
-------

[](#credits)

- [nikic/FastRoute](https://github.com/nikic/FastRoute)
- [EFTEC/BladeOne](https://github.com/EFTEC/BladeOne/)

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity67

Established project with proven stability

 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 ~7 days

Total

7

Last Release

2753d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5d4c08a97e1c9c53efb123c306f551fcb367e8adea3bfa1412c49c8e5133aeff?d=identicon)[xy2z](/maintainers/xy2z)

---

Top Contributors

[![xy2z](https://avatars.githubusercontent.com/u/4496997?v=4)](https://github.com/xy2z "xy2z (22 commits)")

---

Tags

bladebladeonefastroutephpphp7routertemplate-routerroutertemplatestaticmicroframeworkfast-routebladeoneblader

### Embed Badge

![Health badge](/badges/xy2z-blader/health.svg)

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

###  Alternatives

[phpoffice/phpword

PHPWord - A pure PHP library for reading and writing word processing documents (OOXML, ODF, RTF, HTML, PDF)

7.5k34.7M186](/packages/phpoffice-phpword)[rize/uri-template

PHP URI Template (RFC 6570) supports both expansion &amp; extraction

420137.3M46](/packages/rize-uri-template)[tightenco/jigsaw-blog-template

Blog starter template for Jigsaw static site generator by Tighten

9464.0k](/packages/tightenco-jigsaw-blog-template)[tightenco/jigsaw-docs-template

Documentation starter template for Jigsaw static site generator by Tighten

5026.9k](/packages/tightenco-jigsaw-docs-template)[rickwest/jigsaw-clean-blog

Blog starter template for Jigsaw static site generator by Tighten

111.4k](/packages/rickwest-jigsaw-clean-blog)

PHPackages © 2026

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