title: Laravel unique email validation is not working on different character case in mongodb
body: <p>I have a registration form with unique email validation. When I enter different character case, emails does not apply unique validation. </p>
  
  <p><code>example@gmail.com, Example@gmail.com, eXample@gmail.com</code>: Laravel unique validation is failed. </p>
  
  <p><code>example@gmail.com, example@gmail.com, example@gmail.com</code>: Laravel unique validation is success.</p>
  
  <p>Please check my code below and correct me. Email is storing as lowercase in database.</p>
  
  <p>DB - Mongodb, </p>
  
  <p>Framework - Laravel 5.5</p>
  
  <p><a href="https://github.com/jenssegers/laravel-mongodb" rel="nofollow noreferrer">jenssegers/laravel-mongodb is using to connect laravel and mongodb</a></p>
  
  <p><strong>RegisterController.php</strong></p>
  
  <pre><code>protected function validator(array $data)
  {
    return Validator::make($data, [
       'firstName' =&gt; 'required|string|max:255',
       'lastName' =&gt; 'required|string|max:255',
       'email' =&gt; 'required|string|email|max:255|unique:user,usrEmail',
       'password' =&gt; 'required|string|min:6|confirmed',
    ]);
  }
  </code></pre>
  
  <p><strong>User.php</strong> (Model)</p>
  
  <pre><code>public function setusrEmailAttribute($value)
  {
    $this-&gt;attributes['usrEmail'] = strtolower($value);
  }
  </code></pre>