title: SQLSTATE[23000]: Integrity constraint violation: 1048 laravel 5.7
body: <p>I am getting error in Laravel 5.7:</p>
  
  <blockquote>
    <p>Illuminate\Database\QueryException
    SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'name' cannot be null (SQL: insert into <code>stores</code> (<code>name</code>, <code>matric</code>, <code>phone</code>, <code>email</code>, <code>password</code>, <code>updated_at</code>, <code>created_at</code>) values (?, ?, ?, ?, ?, 2019-10-01 16:29:49, 2019-10-01 16:29:49))</p>
  </blockquote>
  
  <p>This is my form:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
      @section('title', 'Sign up for customer page')
  &lt;/head&gt;
  &lt;body class="text-center"&gt;
  @extends('layout.app')
  
  @section('content')
  
  @endsection
  @include('include.navbar')
  &lt;form class="form-signup" action="{{URL:: to('/store')}}" method="post"&gt;
    @csrf
  
    &lt;h1 class="h3 mb-3 font-weight-normal"&gt;Please sign up as customer&lt;/h1&gt;
    &lt;label for="inputname" class="sr-only"&gt;Name&lt;/label&gt;
    &lt;input type="text" id="inputname" class="form-control" placeholder="Name" required&gt;
    &lt;label for="inputmatric" class="sr-only"&gt;ID matric&lt;/label&gt;
    &lt;input type="text" id="inputmatric" class="form-control" placeholder="ID matric" required&gt;
    &lt;label for="inputphon" class="sr-only"&gt;Phone No&lt;/label&gt;
    &lt;input type="text" id="inputphon" class="form-control" placeholder="Phone No" required&gt;
    &lt;label for="inputemail" class="sr-only"&gt;E-mail&lt;/label&gt;
    &lt;input type="text" id="inputemail" class="form-control" placeholder="E-mail" required&gt;
    &lt;label for="inputpassword" class="sr-only"&gt;Password&lt;/label&gt;
    &lt;input type="text" id="inputpassword" class="form-control" placeholder="Password" required&gt;
  
  
    &lt;button class="btn btn-lg btn-primary btn-block"  type="submit"&gt;Sign up&lt;/button&gt;
    &lt;p class="mt-5 mb-3 text-muted"&gt;&amp;copy; 2017-2019&lt;/p&gt;
  &lt;/form&gt;
  
  &lt;/html&gt;
  </code></pre>
  
  <p>This is <code>UserController</code>:</p>
  
  <pre><code>namespace App\Http\Controllers;
  use App\Http\Controllers\Controller;
  use Illuminate\Http\Request;
  use Illuminate\Support\Facades\URL;
  use Illuminate\Support\Facades\DB;
  use App\store;//model name
  
  class UserController extends Controller
  {
      public function store(Request $request)
      {
  
          $this-&gt;validate($request,[
              'name'=&gt; 'request',
              'matric'=&gt; 'request',
              'phone'=&gt; 'request',
              'email'=&gt;'request',
              'password'=&gt; 'request'
  
          ]);
  
          //store new customer
          $store = new store;   // valible and model name
          $store-&gt; name = $request-&gt;input('name');
          $store-&gt; matric = $request-&gt;input('matric');
          $store-&gt; phone = $request-&gt;input('phone');
          $store-&gt; email = $request-&gt;input('email');
          $store-&gt; password = $request-&gt;input('password');
  
          //save new customer
          $store-&gt; save();
  
          //redirect
          return redirect('/');
      }
  }
  </code></pre>
  
  <p>This is the Migration:</p>
  
  <pre><code>&lt;?php
  //create the customer table
  use Illuminate\Support\Facades\Schema;
  use Illuminate\Database\Schema\Blueprint;
  use Illuminate\Database\Migrations\Migration;
  
  class CreateStoresTable extends Migration
  {
      /**
       * Run the migrations.
       *
       * @return void
       */
      public function up()
      {
          Schema::create('stores', function (Blueprint $table) {
              $table-&gt;bigIncrements('id');
              $table-&gt;string ('name');
              $table-&gt;integer ('matric');
              $table-&gt;string ('phone');
              $table-&gt;string ('email');
              $table-&gt;string ('password');
              $table-&gt;timestamps();
          });
      }
  
      /**
       * Reverse the migrations.
       *
       * @return void
       */
      public function down()
      {
          Schema::dropIfExists('stores');
      }
  }
  </code></pre>