dingo / dingo/api

Custom, non-default response format without using env variable

Open
#1,344 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
9.4k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

How can I set up a specific response format (the one that morph uses) just for one method. I tried to use `return (new Response([...])->morph('myFormat');` but it still returns the default (json) format.

I confirmed that `myFormat` works because if I set it as default (env variable), it shows proper output.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.