craftcms / element-api

Create a JSON API/Feed for your elements in Craft.
MIT License
498 stars 57 forks source link

Update documentation example to avoid looping through element query directly #72

Closed daltonrooney closed 6 years ago

daltonrooney commented 6 years ago

Current example generates error

Looping through element queries directly has been deprecated. Use the all() function to fetch the query results before looping over them.

brandonkelly commented 6 years ago

Thanks for pointing that out!