This commit is contained in:
Alexander Makarov
2015-05-26 20:49:07 +03:00
parent 091462d3df
commit fcbb596e7b

View File

@ -264,7 +264,7 @@ models in order to serve data arrays via REST API or use it otherwise. The follo
```php ```php
$posts = Post::find()->limit(10)->all(); $posts = Post::find()->limit(10)->all();
$data = ArrayHelper::toArray($post, [ $data = ArrayHelper::toArray($posts, [
'app\models\Post' => [ 'app\models\Post' => [
'id', 'id',
'title', 'title',