core
core copied to clipboard
How can I override Flight::json()
I would like to pass back additional headers, right now there’s no option to do so, so i’d Like to override the function on line 467 in Engine.php. Accept additional headers in an array, that sort of thing?
Try
\Flight::map('json', function ($data, $code = 200, $encode = true, $charset = 'utf-8')
{
// your code here
});
Seems addressed