title: How do I change the login requirement in Laravel?
body: <p>I made my laravel application authentication via <code>php artisan make:auth</code> which by default requires you to log in with your email and password. </p>
  
  <p>I need to include another requirement where <code>status == active</code> on my table users. So that for a user to log in the three condations:</p>
  
  <ol>
  <li>Has a valid <code>email</code></li>
  <li>Has a valid <code>password</code></li>
  <li>The status on the users table for that particular use is <code>active</code> (this is activated manually) </li>
  </ol>
  
  <p>So on my login controller I have this:</p>
  
  <pre><code>&lt;?php
  namespace App\Http\Controllers\Auth;
  use DB;
  use App\Http\Controllers\Controller;
  use Illuminate\Foundation\Auth\AuthenticatesUsers;
  use Illuminate\Support\Facades\Auth;
  
  class LoginController extends Controller
  {
      use AuthenticatesUsers;
  
      /**
       * Where to redirect users after login.
       *
       * @var string
       */
      // protected $redirectTo = '/home';
  
      /**
       * Create a new controller instance.
       *
       * @return void
       */
      public function __construct()
      {
          $this-&gt;middleware('guest', ['except' =&gt; 'logout']);
      }
  
      public function authenticate()
      {
          if (Auth::attempt(['email' =&gt; $email, 'password' =&gt; $password])) 
  
  
          {
              // Authentication passed...
              return redirect()-&gt;intended('/home');
          }
      }
  }
  </code></pre>
  
  <p>How do insert this condition in the function</p>
  
  <pre><code>  DB::table('users')
      -&gt;where(['status' =&gt; active]); For that particular user?
  </code></pre>
  
  <p>Kindly someone assist.</p>
  
  <p>Thank you.</p>