PHPackages                             koolreport/codeigniter - 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. koolreport/codeigniter

ActiveLibrary

koolreport/codeigniter
======================

Allow to use KoolReport seamlessly in CodeIgniter

1.8.0(6y ago)6166.8k↑13.5%1MITPHP

Since May 9Pushed 6y ago1 watchersCompare

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

READMEChangelog (4)DependenciesVersions (9)Used By (0)

Introduction
============

[](#introduction)

[CodeIgniter](https://codeigniter.com) is without doubt one of the most powerful PHP Framework. it is built with small foot print, simple with ability to create full-featured web applications.

Since we created KoolReport we received many questions like "*How to use KoolReport in CodeIgniter?*". The answer is KoolReport was designed to work with any PHP Frameworks and CodeIgniter is one of them. The setting to make them work together is simple but we want to make things simpler.

So we created this **CodeIgniter pakage**, an extension to let KooLReport work seamlessly inside CodeIgniter environment and providing powerful reporting capability for your CI application. This package will help us to

1. Access CodeIgniter database in report created with Koolreport
2. Automatically publish report resources to CodeIniter's assets folder

All with a simple line of code

```
use \koolreport\codeigniter\Friendship;

```

Requirement
===========

[](#requirement)

1. KoolReport &gt;= 2.75.0
2. CodeIgniter &gt;= 3.0.0

Installation
============

[](#installation)

By downloading .zip file
------------------------

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

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

```
koolreport
├── core
├── codeigniter
```

By composer
-----------

[](#by-composer)

```
composer require koolreport/codeigniter

```

Documentation
=============

[](#documentation)

Friendship
----------

[](#friendship)

In order for a report to access CodeIgniter databases, we will claim the friendship with CodeIgniter in the report.

```
class MyReport extends \koolreport\KoolReport
{
    use \koolreport\codeigniter\Friendship;// All you need to do is to claim this friendship

    function setup()
    {
        //Now you can access database that you configured in codeigniter
        $this->src("sale_database")
        ->query("select * from orders")
        ->pipe($this->dataStore("orders"));
    }
}

```

As you may see from above code, our `MyReport` now can access all database resources of CodeIgniter through simple line of code. Moreover, the MyReport will configured itself to publish its neccessary resources to public folder of CodeIgniter. Everything just work!

Adding another datasources
--------------------------

[](#adding-another-datasources)

In some cases, you have other sources of data that you would like to include into the report, you can just write normal `settings()` function as you normally do in KoolReport.

```
class MyReport extends \koolreport\KoolReport
{
    use \koolreport\codeigniter\Friendship;

    function settings()
    {
        return array(
            "dataSources"=>array(
                "csv_source"=>array(
                    "class"=>'\koolreport\datasources\CSVDataSource',
                    'filePath'=>dirname(__FILE__)."\mycsvdata.csv",
                )
            )
        );
    }

    function setup()
    {
        //Now you can access database that you configured in codeigniter
        $this->src("sale_database")
        ->query("select * from orders")
        ->pipe($this->dataStore("orders"));

        $this->src("csv_source")
        ->pipe(...)
        ...
        ->pipe($this->dataStore("csv"));
    }
}

```

As you can see from above code, you have access both to `sale_database` from CodeIgniter as well as extra `csv_source`.

Customize assets location
-------------------------

[](#customize-assets-location)

By default, the report which has friendship with CodeIgniter will automatically export all of its resources to default location which is `{project_folder}/assets/koolreport_assets`. But in any case, you do not like this settings or just want to organize folder differently you can manually set it up like below:

```
class MyReport extends \koolreport\KoolReport
{
    use \koolreport\codeigniter\Friendship;

    function settings()
    {
        return array(
            "assets"=>array(
                "url"=>"myassets",
                "path"=>"../myassets" // or "path"=>"/var/html/CIProject/myassets"
            )
        );
    }

```

The `path` can be relative path from your report to assets folder or it can be absolute path.

The `url` is url to assets folder that can be accessed through browser.

Support
=======

[](#support)

Please use our forum 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

38

—

LowBetter than 85% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity39

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 55.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 ~8 days

Total

4

Last Release

2542d 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 (5 commits)")[![dongnl](https://avatars.githubusercontent.com/u/5791383?v=4)](https://github.com/dongnl "dongnl (4 commits)")

---

Tags

codeignitermysql-reporting-toolsphp-reporting-toolsreporting-enginephplaravelData ReportReporting ToolsKooLReport CodeIgniterCodeIgniter ReportcodeIgniter reportingcodeIgniter reporting tool

### Embed Badge

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

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

###  Alternatives

[koolreport/laravel

Allow to use KoolReport seamlessly in Laravel

18247.4k](/packages/koolreport-laravel)[octw/aramex

A Library to integrate with Aramex APIs

2925.2k](/packages/octw-aramex)

PHPackages © 2026

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