https://github.com/koolreport/yii2
Ease the report created inside Yii2 environment
https://github.com/koolreport/yii2
Last synced: about 2 months ago
JSON representation
Ease the report created inside Yii2 environment
- Host: GitHub
- URL: https://github.com/koolreport/yii2
- Owner: koolreport
- Created: 2020-01-17T10:12:41.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-01-21T09:50:25.000Z (over 6 years ago)
- Last Synced: 2025-12-01T08:34:18.046Z (7 months ago)
- Language: PHP
- Size: 1.95 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# Introduction
`koolreport/yii2` package helps to ease the KoolReport report created within Yii2 environment. It can help to automatically configure `assets` path and url. Furthermore, it provide `default` datasource configured with Yii2 database connection.
# Installation
## By downloading .zip file
1. [Download](https://www.koolreport.com/packages/yii2)
2. Unzip the zip file
3. Copy the folder `yii2` into `koolreport` folder so that look like below
```bash
koolreport
├── core
├── yii2
```
## By composer
```
composer require koolreport/yii2
```
# Documentation
## Step-by-step tutorial
#### Step 1: Create report and claim friendship with Laravel
1. First, you create folder `reports` inside root folder
2. Inside reports folder, create two files `MyReport.php` and `MyReport.view.php`
3. Adding `use \koolreport\yii2\Friendship` to your report like following
`MyReport.php`
```
src("default")
->query("SELECT * FROM offices")
->pipe($this->dataStore("offices"));
}
}
```
`MyReport.view.php`
```
My Report
It works
$this->dataStore("offices")
]);
?>
```
#### Step 2: Run report and display report
Now you have MyReport ready, in order to get report display inside Yii2, you will create MyReport's object in controller and pass that object to the view to render.
`HomeController.php`
```
run();
return $this->render('report',array(
"report"=>$report
));
}
}
```
`report.php`
```
render(); ?>
```
# 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 __support@koolreport.com__.