title: Private account by a attribute in laravel
body: <p>I have a proplem with this function. 
  My attribute <code>'sv_trangThai'=2</code> , of course. i can log in. and if <code>sv_trangThai=1</code>, this account won't log in because of being locked.
  Ok. 2:can log in and 1: being locked and can't log in.
  Absolutely my code is running well but when i typed the wrong password or username, <code>i got "username or password is not true!"</code>.That's first case. Fine.
  In case 2th, when i typed true password and username, i got the same <code>"username or password is not true".</code>
  I wanna ask to how i should write to Show MessageBag:<code>"This account is being locked"</code> when i use case 2. instead of "username or password is not true".<code>enter code here</code></p>
  
  <pre><code>public function login(Request $request)
      {
          $rules = [
              'sv_ma' =&gt;'required',
              'password' =&gt; 'required|min:6',
          ];
          $messages = [
              'sv_ma.required' =&gt; 'Please type code',
              'password.required' =&gt; 'please type password here',
              'password.min' =&gt; 'password is the least at**strong text** 6!!!!',
  
          ];
           $validator = Validator::make($request-&gt;all(), $rules, $messages);
           if ($validator-&gt;fails()) {
              return redirect()-&gt;back()-&gt;withErrors($validator)-&gt;withInput();
          }
          else
          {
              if (Auth::guard('sinhvien')-&gt;attempt(['sv_ma'=&gt;$request-&gt;sv_ma,'password'=&gt;$request-&gt;password,'sv_trangThai'=&gt;2],$request-&gt;remember))
              {
  
                      return redirect()-&gt;intended('/trangchu');
              }
              else
              {
                   $errors = new MessageBag(['errorlogin' =&gt; 'username or password is not true!']);
                  return redirect()-&gt;back()-&gt;withInput($request-&gt;only('sv_ma','remember'))-&gt;withErrors($errors);
              }
  
          }
  
      }
  </code></pre>