mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-26 06:15:19 +08:00
Fixes #8563
This commit is contained in:
@ -264,7 +264,7 @@ models in order to serve data arrays via REST API or use it otherwise. The follo
|
||||
|
||||
```php
|
||||
$posts = Post::find()->limit(10)->all();
|
||||
$data = ArrayHelper::toArray($post, [
|
||||
$data = ArrayHelper::toArray($posts, [
|
||||
'app\models\Post' => [
|
||||
'id',
|
||||
'title',
|
||||
|
Reference in New Issue
Block a user