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.




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.