diff --git a/docs/guide/active-record.md b/docs/guide/active-record.md index 02d5c85..84d4f7d 100644 --- a/docs/guide/active-record.md +++ b/docs/guide/active-record.md @@ -413,7 +413,7 @@ and you may also join with sub-relations. For example, $orders = Order::find()->innerJoinWith([ 'books', 'customer' => function ($query) { - $query->where('tbl_customer.create_time > ' . (time() - 24 * 3600)); + $query->where('tbl_customer.created_at > ' . (time() - 24 * 3600)); } ])->all(); // join with sub-relations: join with books and books' authors diff --git a/docs/guide/behaviors.md b/docs/guide/behaviors.md index 657f603..544a8fd 100644 --- a/docs/guide/behaviors.md +++ b/docs/guide/behaviors.md @@ -23,8 +23,8 @@ class User extends ActiveRecord 'timestamp' => [ 'class' => 'yii\behaviors\AutoTimestamp', 'attributes' => [ - ActiveRecord::EVENT_BEFORE_INSERT => ['create_time', 'update_time'], - ActiveRecord::EVENT_BEFORE_UPDATE => 'update_time', + ActiveRecord::EVENT_BEFORE_INSERT => ['created_at', 'updated_at'], + ActiveRecord::EVENT_BEFORE_UPDATE => 'updated_at', ], ], ]; @@ -39,7 +39,7 @@ Creating your own behaviors [[NEEDS UPDATING FOR Yii 2]] -To create your own behavior, you must define a class that implements the `IBehavior` interface. This can be accomplished by extending `CBehavior`. More specifically, you can extend `CModelBehavior` or `CActiveRecordBehavior` for behaviors to be used specifically with models or with Active Record models. +To create your own behavior, you must define a class that implements the `IBehavior` interface. This can be accomplished by extending `CBehavior`. More specifically, you can extend `CModelBehavior` or `CActiveRecordBehavior` for behaviors to be used specifically with models or with Active Record models. ```php class MyBehavior extends CActiveRecordBehavior @@ -87,4 +87,4 @@ class MyBehavior extends CActiveRecordBehavior // Use $model->$attr } } -``` \ No newline at end of file +``` diff --git a/docs/guide/model.md b/docs/guide/model.md index 643ce5f..c340b6c 100644 --- a/docs/guide/model.md +++ b/docs/guide/model.md @@ -238,7 +238,7 @@ Using the same `attributes` property you can massively assign data from associat ```php $attributes = [ 'title' => 'Model attributes', - 'create_time' => time(), + 'created_at' => time(), ]; $post->attributes = $attributes; ```