You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The \Illuminate\Foundation\Http\Middleware\TransformsRequest is a very handy middleware that can be used for various types of input transformation, e.g. sanitising.
If one wishes to make use of it, for package development, then one is limited to creating packages that require the full Laravel framework. This means that if one wishes to create a middleware package compatible for Lumen, then the TransformsRequest cannot be used directly - one would have to recreate it manually (a copy)... Its not a bit deal, but it is a bit frustrating.
Possible Solution
Move the TransformsRequest into the Illuminate\Http\Middleware namespace, for an upcoming major version.
The original middleware can still exist in the foundation namespace, but it would have to extend the new one to avoid breaking compatibility.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
The
\Illuminate\Foundation\Http\Middleware\TransformsRequest
is a very handy middleware that can be used for various types of input transformation, e.g. sanitising.If one wishes to make use of it, for package development, then one is limited to creating packages that require the full Laravel framework. This means that if one wishes to create a middleware package compatible for Lumen, then the
TransformsRequest
cannot be used directly - one would have to recreate it manually (a copy)... Its not a bit deal, but it is a bit frustrating.Possible Solution
Move the
TransformsRequest
into theIlluminate\Http\Middleware
namespace, for an upcoming major version.The original middleware can still exist in the foundation namespace, but it would have to extend the new one to avoid breaking compatibility.
Beta Was this translation helpful? Give feedback.
All reactions