Closed carlcs closed 5 years ago
When defining defaults I need to make use of Craft’s request service, and without having it in a callable it’s throwing errors on console requests.
defaults
return [ 'defaults' => function() { $request = Craft::$app->getRequest(); return [ 'paginate' => false, 'includes' => (array)$request->getQueryParam('include'), 'excludes' => (array)$request->getQueryParam('exclude'), ]; }, 'endpoints' => [], ];
Good idea, thanks!
Element API 2.6.0 is out now with this change.
When defining
defaults
I need to make use of Craft’s request service, and without having it in a callable it’s throwing errors on console requests.