title: Custom Laravel validation messages
body: <p>I'm trying to create customized messages for validation in Laravel 5. Here is what I have tried so far:</p>
  
  <pre><code>$messages = [
      'required'  =&gt; 'Harap bagian :attribute di isi.',
      'unique'    =&gt; ':attribute sudah digunakan',
  ];
  $validator = Validator::make($request-&gt;all(), [
      'username' =&gt; array('required','unique:Userlogin,username'),
      'password' =&gt; 'required',
      'email'    =&gt; array('required','unique:Userlogin,email'),$messages
  ]);
  
  if ($validator-&gt;fails()) { 
      return redirect('/')
          -&gt;withErrors($validator) // send back all errors to the login form
          -&gt;withInput();
  } else {
      return redirect('/')
          -&gt;with('status', 'Kami sudah mengirimkan email, silahkan di konfirmasi');   
  }   
  </code></pre>
  
  <p>But it's not working. The message is still the same as the default one. How can I fix this, so that I can use my custom messages?</p>