php - How to pack laravel request with my own variables in middleware for later use? -
i found can like
$request->merge(['aplika' => 5]);
or
$request->request->add(['aplika' => 5]);
but goes request + query in request.
and there can later problem when working model or request form.
i found can other way , put in attributes like:
$request->attributes->add(['aplika' => 5]);
and goes attributes
but how later read in controller?
how this?
maybe there other way in can pack request in middleware in variables not used validation / model things other purpose?
Comments
Post a Comment