PHPackages                             seymennc/php-blade - 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. seymennc/php-blade

ActiveLibrary

seymennc/php-blade
==================

00PHP

Since Sep 22Pushed 1y ago1 watchersCompare

[ Source](https://github.com/seymennc/PHP-Blade)[ Packagist](https://packagist.org/packages/seymennc/php-blade)[ RSS](/packages/seymennc-php-blade/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Luminance PHPBlade Templating Engine
====================================

[](#luminance-phpblade-templating-engine)

Luminance PHPBlade is a lightweight templating engine built in PHP, inspired by Laravel's Blade templating system. It allows you to separate your application's logic from the presentation layer using clear, easy-to-use syntax.

Badges
------

[](#badges)

[![Latest Stable Version](https://camo.githubusercontent.com/60afc4a3ce77eebd350254613698acd166e88cf976aca07bf5c8264b3b2f640c/68747470733a2f2f706f7365722e707567782e6f72672f7365796d656e6e632f7068702d626c6164652f763f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/seymennc/php-blade)

[![Total Downloads](https://camo.githubusercontent.com/39a1d7a6bf96d17372058243d7e7c69a25310badef73c3c06222f137970db1a0/68747470733a2f2f706f7365722e707567782e6f72672f7365796d656e6e632f7068702d626c6164652f646f776e6c6f6164733f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/seymennc/php-blade)

[![Latest Unstable Version](https://camo.githubusercontent.com/e934455d8c375e8cdedbe1541609e540650b356c7e6f8a3c2825474b9df6ea30/68747470733a2f2f706f7365722e707567782e6f72672f7365796d656e6e632f7068702d626c6164652f762f756e737461626c653f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/seymennc/php-blade)

[![License](https://camo.githubusercontent.com/a74cc7cd8b43297f9af83cbc1dc6d97fea74b3cb11054afbcb666333f3bee6ea/68747470733a2f2f706f7365722e707567782e6f72672f7365796d656e6e632f7068702d626c6164652f6c6963656e73653f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/seymennc/php-blade)

[![PHP Version Require](https://camo.githubusercontent.com/f559d4b433ebf4c9069529ae986cf39b58c913fa378eccd6680f501f2479a818/68747470733a2f2f706f7365722e707567782e6f72672f7365796d656e6e632f7068702d626c6164652f726571756972652f7068703f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/seymennc/php-blade)

[![Version](https://camo.githubusercontent.com/1228149fc32c13d02ca35b205b4c3f7c0a6a7adc2189af01110038bdaed0b547/68747470733a2f2f706f7365722e707567782e6f72672f7365796d656e6e632f7068702d626c6164652f76657273696f6e3f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/seymennc/php-blade)

🔗 Links
-------

[](#-links)

[![portfolio](https://camo.githubusercontent.com/ee59c11a0ffcc301e7d0b1201866923b89c43bfd5701d3a45eef9372794dc301/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6d795f706f7274666f6c696f2d3030303f7374796c653d666f722d7468652d6261646765266c6f676f3d6b6f2d6669266c6f676f436f6c6f723d7768697465)](https://seymencayir.com.tr/)[![linkedin](https://camo.githubusercontent.com/9745a59ad4a919d2e524512c3f732c820d4aa0fe927def4f37c4aba08f7e42bc/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c696e6b6564696e2d3041363643323f7374796c653d666f722d7468652d6261646765266c6f676f3d6c696e6b6564696e266c6f676f436f6c6f723d7768697465)](https://www.linkedin.com/in/seymennc)[![twitter](https://camo.githubusercontent.com/79cbea7e1aa9ec614d34050bdc4128542d8527807ac8ce879f953ced3478375d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f747769747465722d3144413146323f7374796c653d666f722d7468652d6261646765266c6f676f3d74776974746572266c6f676f436f6c6f723d7768697465)](https://twitter.com/benseymenemen)

Features
--------

[](#features)

- **Lightweight:** Minimal and easy to integrate into any PHP project.
- **Dynamic Templating:** Define sections, layouts, and reusable components
- **CSRF Protection:** Built-in support for including CSRF tokens in your forms.
- **View Caching:** Cache compiled views for improved performance.
- **Blade-style Syntax:** Utilizes similar directives as Laravel's Blade for a familiar experience.

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

[](#installation)

To use the project, follow these steps:

### Git Clone

[](#git-clone)

```
git clone https://github.com/seymennc/php-blade.git
```

```
cd php-blade
```

```
php -S 127.0.0.1:8080
```

### Composer

[](#composer)

#### If you create new project with php-blade

[](#if-you-create-new-project-with-php-blade)

```
composer create-project seymennc/php-blade php-blade
```

```
cd php-blade
```

```
php -S 127.0.0.1:8080
```

#### If you will only use it in your project

[](#if-you-will-only-use-it-in-your-project)

```
composer require seymennc/php-blade
```

Usage
-----

[](#usage)

Include the autoloader in your project:

```
require 'vendor/autoload.php';
```

Make sure to define the paths for the view and cache directories in your configuration:

```
// Example configuration in config.php
return [
    [
        'views' => dirname(__DIR__) . '/resources/views',
        'cache' => dirname(__DIR__) . '/storage/cache',
        'suffix' => '.blade.php'
    ]
];
```

### Rendering a View

[](#rendering-a-view)

To render a view, simply call the Blade::view() method:

```
use Luminance\Service\phpblade\Blade\Blade;

echo Blade::view('home');
```

### Or you can use it like this

[](#or-you-can-use-it-like-this)

```
use Luminance\Service\phpblade\Blade\Blade;

view('home');
```

Should you need to pass data to the view, you can do so by passing an array as the second argument:

```
echo Blade::view('home', ['title' => 'Welcome Home']);
//Or use this
view('home', ['title' => 'Welcome Home']);
```

### Sections and Extending Layouts

[](#sections-and-extending-layouts)

You can define sections and extend layouts using the familiar Blade-style directives:

```
// layouts/master.blade.php
>

    @yield('title')

    @yield('content')

// views/home.blade.php
@extends('layouts.master')

@section('title', 'Home Page')

@section('content')
Welcome to the Home Page
@endsection
```

### CSRF Tokens

[](#csrf-tokens)

For forms that require CSRF tokens:

```

    @csrf

```

### All Usable Directives

[](#all-usable-directives)

```
@include('view')
```

```
{{ /* For PHP Variables */}}
```

```
@foreach(array)
    // Loop
@endforeach
```

```
@section('section')
    // Section
@endsection
```

```
@extends('layout')
```

```
@yield('section')
```

```
@csrf
```

More examples will be found in the [Asgard Docs](https://seymencayir.com.tr/asgard/docs/).

Contributing
------------

[](#contributing)

We welcome contributions! If you find a bug or have suggestions for improvements, please open an issue or contribute directly to the project.

Our ♥️ Contributors
-------------------

[](#our-️-contributors)

[ ![](https://camo.githubusercontent.com/b668c2bca1360a6808d244ebba39785713b000f7ac2f70820e8891436c7d1d8d/68747470733a2f2f636f6e747269622e726f636b732f696d6167653f7265706f3d7365796d656e6e632f5048502d526f757465)](https://github.com/seymennc/PHP-Route/graphs/contributors)License
-------

[](#license)

Licensed under the GNU GENERAL PUBLIC LICENSE, Copyright © 2024-present BLC Studio

###  Health Score

13

—

LowBetter than 1% of packages

Maintenance29

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity17

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/9bc18b98258be17c4a26c11b7a636e9ed69ad2348770b9545a6723d4a9deb1ec?d=identicon)[seymennc](/maintainers/seymennc)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/seymennc-php-blade/health.svg)

```
[![Health](https://phpackages.com/badges/seymennc-php-blade/health.svg)](https://phpackages.com/packages/seymennc-php-blade)
```

PHPackages © 2026

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