title: Laravel Auth attempt not working
body: <p>First i created the Admin model in which i implemented it using Authenticable Admin.php     </p>
  
  <pre><code>&lt;?php
  
      namespace App;
  
      use Illuminate\Database\Eloquent\Model;
  
      use Illuminate\Auth\Authenticatable;
  
      class Admin extends Model implements \Illuminate\Contracts\Auth\Authenticatable
      {
          //
          use Authenticatable;
      }
  </code></pre>
  
  <p>then i created the migration : 
      
  
  <pre><code>    use Illuminate\Support\Facades\Schema;
      use Illuminate\Database\Schema\Blueprint;
      use Illuminate\Database\Migrations\Migration;
  
      class CreateAdminsTable extends Migration
      {
          /**
           * Run the migrations.
           *
           * @return void
           */
          public function up()
          {
              Schema::create('admins', function (Blueprint $table) {
                  $table-&gt;increments('id');
                  $table-&gt;timestamps();
                  $table-&gt;rememberToken();
                  $table-&gt;string('email');
                  $table-&gt;string('password');
              });
          }
  
          /**
           * Reverse the migrations.
           *
           * @return void
           */
          public function down()
          {
              Schema::drop('admins');
          }
      }
  </code></pre>
  
  <p>Replaced the Users model in config/auth.php with Admin Model :</p>
  
  <pre><code>'providers' =&gt; [
          'users' =&gt; [
              'driver' =&gt; 'eloquent',
              'model' =&gt; App\Admin::class,
          ],
  </code></pre>
  
  <p>AdminController.php</p>
  
  <pre><code>&lt;?php
  
  namespace App\Http\Controllers;
  use App\Post;
  use Illuminate\Http\Request;
  use Auth;
  
  class AdminController extends Controller{
  
      public function getIndex()
      {
          $posts= Post::orderBy('created_at','desc')-&gt;take(3)-&gt;get();
          return view('backend.index')-&gt;with(['posts'=&gt;$posts]);
      }
  
      public function getLogin(){
          return view('backend.login');
      }
  
      public function postLogin(Request $request){
          $this-&gt;validate($request,[
              'email'=&gt;'required|email',
              'password'=&gt;'required'
          ]);
  
          dd(Auth::attempt(['email'=&gt;$request['email'],'password'=&gt;$request['password']]));
  
          if(!Auth::attempt(['email'=&gt;$request['email'],'password'=&gt;$request['password']])){
              return redirect()-&gt;back()-&gt;with(['fail'=&gt;'Could Not Log You In']);
          }
  
          return redirect()-&gt;route('admin.index');
      }
  
      public function getLogout(){
          Auth::logout();
          return redirect()-&gt;route('blog.index');
      }
  
  }
  </code></pre>
  
  <p>web.php</p>
  
  <pre><code>Route::get('/admin/login',[
      'uses'=&gt;'AdminController@getLogin',
      'as'=&gt;'admin.login'
  ]);
  
  Route::post('/admin/login',[
      'uses'=&gt;'AdminController@postLogin',
      'as'=&gt;'admin.login'
  ]);
  </code></pre>
  
  <p>login.blade.php</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
      &lt;title&gt;Admin Area&lt;/title&gt;
      &lt;meta charset="utf-8"&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
      &lt;link rel="stylesheet" href="{{URL::to('css/bootstrap.min.css')}}"&gt;
      &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"&gt;&lt;/script&gt;
      &lt;script src="{{URL::to('js/bootstrap.min.js')}}"&gt;&lt;/script&gt;
      @yield('styles')
  &lt;/head&gt;
  &lt;body&gt;
  &lt;div class="container"&gt;
      &lt;div class="container-fluid"&gt;
          @include('includes.info-box')
          &lt;form method="post" action="{{route('admin.login')}}"&gt;
              &lt;div class="form-group"&gt;
                  &lt;label for="email"&gt;Email: &lt;/label&gt;
                  &lt;input type="email" class="form-control" id="email" name="email"
                         {{$errors-&gt;has('email')?'class=alert alert-danger':'' }}
                         value="{{Request::old('email')}}"&gt;
              &lt;/div&gt;
              &lt;div class="form-group"&gt;
                  &lt;label for="password"&gt;Password: &lt;/label&gt;
                  &lt;input type="password" class="form-control" id="password" name="password"
                         {{$errors-&gt;has('password')?'class=alert alert-danger':'' }}
                         &gt;
              &lt;/div&gt;
              &lt;div class="form-group"&gt;
                  &lt;button type="submit" class="btn btn-default"&gt;Login&lt;/button&gt;
                  &lt;input type="hidden" name="_token" value="{{Session::token()}}"&gt;
              &lt;/div&gt;
          &lt;/form&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>so when i tried to login and dd the Auth Attempt it is returning false i have a user with email test@123.com and password test :
  <a href="https://i.stack.imgur.com/cxClN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cxClN.png" alt="enter image description here"></a></p>
  
  <p>created the user using seeder :</p>
  
  <pre><code>&lt;?php
  
  use Illuminate\Database\Seeder;
  
  class AdminTableSeeder extends Seeder
  {
      /**
       * Run the database seeds.
       *
       * @return void
       */
      public function run()
      {
          //
          $admin = new \App\Admin;
          $admin-&gt;email='test@123.com';
          $admin-&gt;password='test@123.com';
          $admin-&gt;save();
      }
  }
  </code></pre>