title: change value of $request before validation in laravel 5.5
body: <p>I have a form in <code>route('users.create')</code>.</p>
  
  <p>I send form data to this function in its contoller:</p>
  
  <pre><code>public function store(UserRequest $request)
  {
  
      return redirect(route('users.create'));
  }
  </code></pre>
  
  <p>for validation I create a class in </p>
  
  <p><strong>App\Http\Requests\Panel\Users\UserRequest;</strong></p>
  
  <pre><code>class UserRequest extends FormRequest
  {
      public function rules()
      {
          if($this-&gt;method() == 'POST') {
               return [
                   'first_name' =&gt; 'required|max:250',
  </code></pre>
  
  <p>It works.</p>
  
  <p>But How can I change <code>first_name</code> value before validation (and before save in DB)?</p>
  
  <p>(Also with failed validation, I want to see new data in <code>old('first_name')</code></p>
  
  <p><strong>Update</strong></p>
  
  <p>I try this: </p>
  
  <pre><code> public function rules()
      {
       $input = $this-&gt;all();
  
  
       $input['first_name'] = 'Mr '.$request-&gt;first_name;
       $this-&gt;replace($input);
  
       if($this-&gt;method() == 'POST') {
  </code></pre>
  
  <p>It works before <code>if($this-&gt;method() == 'POST') {</code> But It has not effect for validation or for <code>old()</code> function</p>