title: Stop Laravel Validation replacing underscores with a space in :attribute placeholder
body: <p>I am using a <a href="https://laravel.com/docs/5.5/validation#manually-creating-validators" rel="nofollow noreferrer">Validator</a> to validate request parameters and return helpful messages to the users of a public API. If the validator fails I return a view:</p>
  
  <pre><code>if( $validator-&gt;fails() ){
      $data = ['errors' =&gt; $validator-&gt;errors()-&gt;messages() ];
      return response()-&gt;view('errors.412', $data, 412)
                      -&gt;header("HTTP/1.0 412 Precondition Failed", null);
  } else {
      ...
  }
  </code></pre>
  
  <p>The view...</p>
  
  <pre><code>&lt;ul&gt;
      @foreach( $errors as $field )
          @foreach( $field as $error )
              &lt;li&gt;{{ $error }}&lt;/li&gt;
          @endforeach
      @endforeach
  &lt;/ul&gt;
  </code></pre>
  
  <p>Because these messages are to be consumed by developers I want them to be technical and specific. Therefore it's really annoying that Laravel automatically strips the space from my parameter keys. </p>
  
  <p>For the message:</p>
  
  <p><code>'The :attribute field is required.'</code></p>
  
  <p>Laravel returns:</p>
  
  <blockquote>
    <p>The vehicle name field is required.</p>
  </blockquote>
  
  <p>...but I want the more accurate:</p>
  
  <blockquote>
    <p>The vehicle_name field is required.</p>
  </blockquote>
  
  <p>The only fix I have found is to add the following lines to <code>/resources/lang/en/validation.php</code>:</p>
  
  <pre><code>'attributes' =&gt; [
      'vehicle_name' =&gt; 'vehicle_name'
  ],
  </code></pre>
  
  <p>But that just feels backwards that I would have to provide a bunch of identical key-pair values in a language translation file just to instruct the framework to undo an unwanted behaviour. </p>
  
  <p>Is there a better way?</p>