Hello,
From this page:
http://www.yiiframework.com/doc-2.0/guide-output-data-providers.html
It shows:
$provider = new ActiveDataProvider([
'query' => Post::find(),
'pagination' => [
'pageSize' => 20,
],
]);
// get the posts in the current page
$posts = $provider->getModels();
When I tried to "echo $posts = $provider->getModels();", I am getting the error "Array to string conversion".
Could someone please give me a little help on this?
Thank you,
Ben