Why is the response type returned when creating a new default middleware not its own response type? #51334
Unanswered
ZhangChengLin
asked this question in
Q&A
Replies: 1 comment 5 replies
-
namespace Illuminate\Http; use Symfony\Component\HttpFoundation\Response as SymfonyResponse; class Response extends SymfonyResponse |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Code involved:
framework/src/Illuminate/Routing/Console/stubs/middleware.stub
Line 14 in eb04fb4
Scenes:
First of all, this question is a question from a newbie.
Why continue to use: \Symfony\Component\HttpFoundation\Response now
Shouldn't it be recommended to use Illuminate\Http\Response
Why hasn't it changed yet? Is it to maintain compatibility?
Or what are the benefits of doing so?
Similar questions
Beta Was this translation helpful? Give feedback.
All reactions