Laravel 5.4 $ request-> get trimming whitespace in input
Laravel trims spaces at the beginning of a line. Example:
" this is a test"
Returns
This is a test
I am using Laravels $request->get('name')
When I use $_POST
laravel in my app, it works fine.
Does anyone know how I can achieve this with $request->get()
In laravel 5.4, Taylor added middleware TrimStrings
to the default staging middleware group. This way you can remove \App\Http\Middleware\TrimStrings::class
from Http\Kernel.php
.