Laravel: Integrating Throttle in Custom Login : <p>How to integrate laravel throttle if I did not use the default LoginController given by laravel? </p>

<p>here's my controller: </p>

<pre><code>  use AuthenticatesUsers;

  //function for login
  public function login(Request $requests){
    $username = $requests-&gt;username;
    $password = $requests-&gt;password;

    /**to login using email or username**/
    if(filter_var($username, FILTER_VALIDATE_EMAIL)) {

      Auth::attempt(['email' =&gt; $username, 'password' =&gt; $password]);
    } else {

      Auth::attempt(['username' =&gt; $username, 'password' =&gt; $password]);
    }


    if(Auth::check()){
      if(Auth::user()-&gt;type_user == 0){

        return view('users.dashboard');

      }
      else{
        return view('admin.dashboard');
      }
    }
    else{

      return Redirect::back()-&gt;withInput()-&gt;withErrors(['message'=&gt;$login_error],'login');

    }
  }
</code></pre>

<p>I want to limit the failed logins but I can't seem to make it work using my own controller. Can you guys help me please?</p>
