2017 © Pedro Peláez
 

yii2-extension yii2-logs

Logs

image

jakharbek/yii2-logs

Logs

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Yii2 Logs

Core, (*1)

Installation

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

php composer.phar require --prefer-dist jakharbek/yii2-logs "*"

or add, (*4)

"jakharbek/yii2-logs": "*"

to the require section of your composer.json file., (*5)

Usage

Once the extension is installed, simply use it in your code by :, (*6)

Вам нужно сделать миграцию:, (*7)

yii migrate --migrationPath=@vendor/jakharbek/yii2-logs/src/migrations

Если вы хотите применить к определёному таблицы вам нужно создать связь между ними и в той модели (ActiveRecord) таблицы, реализовать интерфейс LogInterface, (*8)

Пример 1:, (*9)

 <?=\jakharbek\logs\widgets\LogWidget::widget([
           'model' => $model,
            'view' => '@your/path/to/view',
            'provider' => [
                    'pagination' => [
                            'pageSize' => 20
                    ]
            ]
    ])?>

view, (*10)


/** * @var \jakharbek\logs\models\Logs $log * @var \yii\db\ActiveRecord $model * @var \yii\data\BaseDataProvider $provider */ echo ListView::widget([ 'dataProvider' => $provider, 'itemOptions' => ['class' => 'item'], 'itemView' => function ($log, $key, $index, $widget) use ($model) { return $log->render($model); } ]);

Пример 2:, (*11)

 <?=\jakharbek\logs\widgets\LogListWidget::widget([
           'model' => $model,
            'provider' => [
                    'pagination' => [
                            'pageSize' => 20
                    ]
            ],
            'itemOptions' => ['class' => 'item'],
            'itemView' => function ($log, $key, $index, $widget) use ($model) {
                return $log->render($model);
            }
    ])?>

The Versions

02/06 2018

dev-master

9999999-dev

Logs

  Sources   Download

MIT

The Requires

 

by Jakharbek
by utkir

extension yii2 logs

02/06 2018

1.0

1.0.0.0

Logs

  Sources   Download

MIT

The Requires

 

by Jakharbek
by utkir

extension yii2 logs