I am a beginner in Laravel 5.
How can I remove whitespaces in validator?? i have read the documentation but there is no validator for trim(remove whitespaces).
You can use this in your request file.
$input = request()->all();
$input['url'] = trim($input['url']);
request()->replace($input);
You can also create an all() function in your request file to update request parameters:
public function all()
{
$all = parent::all(); // $this->all();
$all['new_key'] = "new_data";
$all['old_key'] = "new_data";
return $all;
}