PHPackages                             koolreport/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. [Templating &amp; Views](/categories/templating)
4. /
5. koolreport/blade

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

koolreport/blade
================

Allow KoolReport to use blade template engine to render view

1.0.2(1y ago)174.0k↑13.8%3[1 issues](https://github.com/koolreport/blade/issues)MITPHP

Since Jun 1Pushed 1y ago1 watchersCompare

[ Source](https://github.com/koolreport/blade)[ Packagist](https://packagist.org/packages/koolreport/blade)[ Docs](https://www.koolreport.com)[ RSS](/packages/koolreport-blade/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (3)Dependencies (1)Versions (7)Used By (0)

Blade
=====

[](#blade)

Overview
--------

[](#overview)

If you have used Laravel and fell in love with `Blade` template engine then you may use this love template engine with KoolReport. Starting from version 4.0.0, KoolReport supports other template engines rather than just its own template view file.

So by using `blade` template engine, you can utilize the power of template inheritance such as creating common layout for your report.

Blade does not restrict you from using plain PHP code in your views. In fact, all Blade views are compiled into plain PHP code and cached until they are modified, meaning Blade adds essentially zero overhead to your report.

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

[](#installation)

#### By downloading .zip file

[](#by-downloading-zip-file)

1. [Download](https://www.koolreport.com/packages/blade)
2. Unzip the zip file
3. Copy the folder `blade` into `koolreport` folder so that look like below

```
koolreport
├── core
├── blade
```

#### By composer

[](#by-composer)

```
composer require koolreport/blade

```

Get started
-----------

[](#get-started)

**Step 1:** First you should create two folders, first is `views` to hold the views of your reports, secondly is `cache` folder for blade to generate cache file.

```
project/
├── reports/
│   └── MyReport.php
├── views/
│   └── myreport.blade.php
├── cache/
```

**Step 2:** Next, in your `MyReport.php` you initiate blade template like this:

```
require_once "../../koolreport/core/autoload.php";

class MyReport extends \koolreport\KoolReport
{
    use \koolreport\blade\Engine;

    protected function bladeInit()
    {
        $viewsFolder = __DIR__."/../views";
        $cacheFolder = __DIR__."/../cache";
        $blade = new \Jenssegers\Blade\Blade($viewsFolder, $cacheFolder);
        return $blade;
    }
    ...

}

```

**Step 3:** Create report's view content. In your `myreport.blade.php` you can do:

```

    MyReport

```

***Important Note*:** You need to use `$report` variable to refer to the report class, not `$this` as you do when use default Koolreport view file.

**Step 4:** To make the report run and render, you do:

```
//index.php

require_once "MyReport.php";

$report = new MyReport;
$report->run()->render("myreport"); // You need to specify the view you want to render

```

Now your report will run and then use `myreport.blade.php` to render the view of report.

**Congrat!**

Resources
=========

[](#resources)

1. [Full documentation](https://www.koolreport.com/docs/blade/overview/)
2. [Examples &amp; Demonstration](https://www.koolreport.com/examples)

Support
=======

[](#support)

Please use [our forum](https://www.koolreport.com/forum/topics) if you need support, by this way other people can benefit as well. If the support request need privacy, you may send email to us at .

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance14

Infrequent updates — may be unmaintained

Popularity34

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 84.6% 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 ~961 days

Total

3

Last Release

643d ago

### Community

Maintainers

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

---

Top Contributors

[![tuananhnghiem](https://avatars.githubusercontent.com/u/7497712?v=4)](https://github.com/tuananhnghiem "tuananhnghiem (11 commits)")[![dongnl](https://avatars.githubusercontent.com/u/5791383?v=4)](https://github.com/dongnl "dongnl (2 commits)")

---

Tags

bladeblade-engineblade-templateblade-template-enginemysql-reporting-toolsphp-reporting-toolsreporting-enginetemplate-enginephptemplate engineData ReportReporting Toolsblade php

### Embed Badge

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

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

###  Alternatives

[talesoft/tale-pug

A clean, lightweight and easy-to-use templating engine for PHP based on Pug, formerly Jade

319.5k3](/packages/talesoft-tale-pug)

PHPackages © 2026

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