vjik/yii2-cycle-debug

Panel "Cycle ORM" for Yii2 Debug

1.0.1 2020-09-10 13:42 UTC

This package is auto-updated.

Last update: 2024-10-10 22:13:30 UTC


README

Panel "Cycle ORM" for Yii2 Debug


Latest Stable Version Total Downloads

Installation

The preferred way to install this extension is through composer:

composer require vjik/yii2-cycle-debug --dev

Config logger in container:

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:

'vjik/yii2-cycle' => [
    'dbal' => [
        'query-logger' => 'DebugOrmLogger',
        …
    ],
    …
],

Add panel to Debug config:

'modules' => [
    'debug' => [
        'class' => \yii\debug\Module::class,
        'panels' => [
            'orm' => \Vjik\Yii2\Cycle\Debug\OrmPanel::class,
        ],
    ],
    …
],