Closed sunnydesign closed 2 years ago
Trimming strings is done by the Laravel TrimStrings
middleware. In a default Laravel app install, that's in your middleware stack here:
https://github.com/laravel/laravel/blob/196a27593b288f7e4d3ce30585ebd881933726b4/app/Http/Kernel.php#L22
If you remove that from your middleware stack, you should find the values are not trimmed.
Thank you very much! I wish you many years of life dear friend!
aha, thank you!!
Hi!
I send PATCH request with this data (value contains a space character at the end):
But space characters are trimmed before validating in my
ParserRequest
and I can't influence this in any way. Therefore the value is saved to the DB without a space! And I get response without a space inmyAttribute
.How can I avoid this? I want to save the data as I sent it.