https://github.com/vjik/yii2-cycle-debug
Panel "Cycle ORM" for Yii2 Debug
https://github.com/vjik/yii2-cycle-debug
cycle debug orm yii2
Last synced: about 1 year ago
JSON representation
Panel "Cycle ORM" for Yii2 Debug
- Host: GitHub
- URL: https://github.com/vjik/yii2-cycle-debug
- Owner: vjik
- License: bsd-3-clause
- Created: 2020-08-02T07:44:25.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-09-10T13:44:15.000Z (almost 6 years ago)
- Last Synced: 2024-04-20T14:59:22.514Z (about 2 years ago)
- Topics: cycle, debug, orm, yii2
- Language: PHP
- Homepage:
- Size: 8.79 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
Panel "Cycle ORM" for Yii2 Debug
[](https://packagist.org/packages/vjik/yii2-cycle-debug)
[](https://packagist.org/packages/vjik/yii2-cycle-debug)

## Installation
The preferred way to install this extension is through [composer](https://getcomposer.org/download/):
```
composer require vjik/yii2-cycle-debug --dev
```
Config logger in container:
```php
use yii\helpers\ArrayHelper;
…
'container' => [
'singletons' => ArrayHelper::merge(
require __DIR__ . '/../../vendor/vjik/yii2-cycle/config/common.php',
[
'DebugOrmLogger' => new \Vjik\Yii2\Cycle\Debug\LoggerFactory(),
…
]
),
],
```
Add logger to Cycle ORM config:
```php
'vjik/yii2-cycle' => [
'dbal' => [
'query-logger' => 'DebugOrmLogger',
…
],
…
],
```
Add panel to Debug config:
```php
'modules' => [
'debug' => [
'class' => \yii\debug\Module::class,
'panels' => [
'orm' => \Vjik\Yii2\Cycle\Debug\OrmPanel::class,
],
],
…
],
```