craftcms / element-api

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

Problem with query parameters in Craft 3 #92

Closed clarknelson closed 5 years ago

clarknelson commented 5 years ago

I am having problems with using Craft::$app->request->getQueryParams() in the element API configuration. In fact anything related to the query parameters doesn't seem to work (Craft::$app->request->getQueryString() returns empty string even with ?query=parks).

Here is my relevent code, not sure what to do! It seems to work fine in twig. I've already opened up an issue with craft/cms.

screen shot 2018-11-21 at 9 14 42 am

screen shot 2018-11-21 at 9 19 07 am

screen shot 2018-11-21 at 9 17 03 am

screen shot 2018-11-21 at 9 16 27 am

angrybrad commented 5 years ago

Resolved in https://github.com/craftcms/cms/issues/3480

clarknelson commented 5 years ago

thanks for your help with this, I put all the pieces together today and it works great