title: laravel "SQLSTATE[HY000]: General error: 1 no such table: user" but 'users' table exists
body: <p>I am running Laravel 5.2, on Windows 8.1 using XAMPP with php 7.2, and I am trying to register a user using laravel auth register form with sqlite database. However when I try insert new record to table <code>users</code> I got error.</p>
  
  <blockquote>
    <p>SQLSTATE[HY000]: General error: 1 no such table: user</p>
  </blockquote>
  
  <p>When I migrate database it creates users table. But when I try to insert new record in <code>users</code> table with register form it tries to access <code>user</code> table. So I created <code>user</code> table in database it works fine but the record is inserted in <code>users</code> table and not in <code>user</code> table.</p>
  
  <p><strong>Migration</strong></p>
  
  <pre><code>public function up(){
      Schema::create('users', function (Blueprint $table) {
          $table-&gt;increments('user_id');
          $table-&gt;string('name');
          $table-&gt;string('role');
          $table-&gt;string('username');
          $table-&gt;string('password');
          $table-&gt;rememberToken();
          $table-&gt;timestamps();
          });
      }
  
  public function down(){
      Schema::drop('users');
  }
  </code></pre>
  
  <p><strong>User model</strong></p>
  
  <pre><code>class User extends Authenticatable{
      protected $primaryKey = 'user_id';
  
      protected $fillable = [
          'name', 'role', 'username', 'password',
      ];
  
      protected $hidden = [
          'password', 'remember_token',
      ];
  }
  </code></pre>
  
  <p><strong>AuthController</strong></p>
  
  <pre><code>namespace App\Http\Controllers\Auth;
  
  use App\User;
  use Validator;
  use App\Http\Controllers\Controller;
  use Illuminate\Foundation\Auth\ThrottlesLogins;
  use Illuminate\Foundation\Auth\AuthenticatesAndRegistersUsers;
  
  class AuthController extends Controller{
  
      use AuthenticatesAndRegistersUsers, ThrottlesLogins;
  
      protected $redirectTo = '/';
      protected $username = 'username';
  
      public function __construct()
      {
          $this-&gt;middleware($this-&gt;guestMiddleware(), ['except' =&gt; 'logout']);
      }
  
      protected function validator(array $data)
      {
          return Validator::make($data, [
              'name' =&gt; 'required|max:255',
              'role' =&gt; 'required|max:7',
              'username' =&gt; 'required|unique:user',
              'password' =&gt; 'required|min:6|confirmed',
          ]);
      }
  
      protected function create(array $data)
      {
          return User::create([
              'name' =&gt; $data['name'],
              'role' =&gt; $data['role'],
              'username' =&gt;$data['username'],
              'password' =&gt; bcrypt($data['password']),
          ]);
      }
  }
  </code></pre>
  
  <p>thanks for help and sorry for bad english.</p>