We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 54b73e2 commit 5d2e2a6Copy full SHA for 5d2e2a6
src/Decorators/ControllerDecorator.php
@@ -70,9 +70,9 @@ public function __invoke(string $method)
70
71
$response = $this->run($method);
72
73
- if ($this->hasMethod('jsonResponse') && ($request->expectsJson() || $request->isJson())) {
+ if ($this->hasMethod('jsonResponse') && $request->expectsJson()) {
74
$response = $this->callMethod('jsonResponse', [$response, $request]);
75
- } elseif ($this->hasMethod('htmlResponse') && ! ($request->expectsJson() || $request->isJson())) {
+ } elseif ($this->hasMethod('htmlResponse') && ! $request->expectsJson()) {
76
$response = $this->callMethod('htmlResponse', [$response, $request]);
77
}
78
0 commit comments