title: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'univ' cannot be null
body: <p>I am trying to insert data in table using laravel and mysql but I see the error <code>SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'univ' cannot be null</code> , while I am not inserting any null value. I am filling all the field in form. what is the reason? please help.</p>
  
  <p>My form is education.blade.php and its code is given.</p>
  
  <pre><code>@section('content')
  
      &lt;div class="container"&gt;&lt;br&gt;
          &lt;h1 class="text-success text-center"&gt;Add Education Here&lt;/h1&gt;&lt;br&gt;
          &lt;div class="col-md-offset-3 col-md-6 m-auto d-block"&gt;
              &lt;form action="edu" method="post"&gt;
                  &lt;input type="hidden" name="_token" value="{{csrf_token()}}"&gt;
                  &lt;input type="text" name="degree" value=" MSc / BS" disabled&gt;
                  &lt;div&gt;
                      &lt;div class="form-group"&gt;
                          &lt;label&gt;University: &lt;/label&gt;
                          &lt;input type="text" name="univ" id="" class="form-control"&gt;
                      &lt;/div&gt;
  
                      &lt;div class="form-group"&gt;
                          &lt;label&gt;Country: &lt;/label&gt;
                          &lt;input type="text" name="country" id="" class="form-control"&gt;
                      &lt;/div&gt;
  
                      &lt;div class="form-group"&gt;
                          &lt;label&gt;Year: &lt;/label&gt;
                          &lt;input type="number" name="year" id="" class="form-control"&gt;
                      &lt;/div&gt;
  
                      &lt;div class="form-group"&gt;
                          &lt;label&gt;Research Area: &lt;/label&gt;
                          &lt;input type="text" name="research" id="" class="form-control"&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;input type="submit" name="submit" value="ADD!" class="btn btn-lg col-md-offset-3 col-md-6 m-auto d-block"&gt;
              &lt;/form&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  
  @endsection
  </code></pre>
  
  <p><strong>The code of my migration  is given here.</strong></p>
  
  <pre><code>&lt;?php
  
  use Illuminate\Support\Facades\Schema;
  use Illuminate\Database\Schema\Blueprint;
  use Illuminate\Database\Migrations\Migration;
  
  class CreateEducsTable extends Migration
  {
      /**
       * Run the migrations.
       *
       * @return void
       */
      public function up()
      {
          Schema::create('educs', function (Blueprint $table) {
              $table-&gt;increments('id');
              $table-&gt;integer('user_id')-&gt;unsigned();
              $table-&gt;foreign('user_id')-&gt;references('id')-&gt;on('registrations');
              $table-&gt;string('degree');
              $table-&gt;string('univ');
              $table-&gt;string('country');
              $table-&gt;integer('year');
              $table-&gt;text('research_area');
              $table-&gt;timestamps();
          });
      }
  
      /**
       * Reverse the migrations.
       *
       * @return void
       */
      public function down()
      {
          Schema::dropIfExists('educs');
      }
  }
  </code></pre>
  
  <p><strong>The code of my controller is given EduContoller.php</strong></p>
  
  <pre><code>&lt;?php
  
  namespace App\Http\Controllers;
  
  use Request;
  
  use App\educ;
  
  class EduController extends Controller
  {
      /**
       * Display a listing of the resource.
       *
       * @return \Illuminate\Http\Response
       */
      public function index()
      {
          //
      }
  
      /**
       * Show the form for creating a new resource.
       *
       * @return \Illuminate\Http\Response
       */
      public function create()
      {
          //
          return view('education');
      }
  
      /**
       * Store a newly created resource in storage.
       *
       * @param  \Illuminate\Http\Request  $request
       * @return \Illuminate\Http\Response
       */
      public function store(Request $request)
      {
          //
          educ::create(Request::all());
          return 'inserted';
      }
  
      /**
       * Display the specified resource.
       *
       * @param  int  $id
       * @return \Illuminate\Http\Response
       */
      public function show($id)
      {
          //
      }
  
      /**
       * Show the form for editing the specified resource.
       *
       * @param  int  $id
       * @return \Illuminate\Http\Response
       */
      public function edit($id)
      {
          //
      }
  
      /**
       * Update the specified resource in storage.
       *
       * @param  \Illuminate\Http\Request  $request
       * @param  int  $id
       * @return \Illuminate\Http\Response
       */
      public function update(Request $request, $id)
      {
          //
      }
  
      /**
       * Remove the specified resource from storage.
       *
       * @param  int  $id
       * @return \Illuminate\Http\Response
       */
      public function destroy($id)
      {
          //
      }
  }
  </code></pre>
  
  <p><strong>and The code of my model is given here.</strong></p>
  
  <pre><code>    &lt;?php
  
      namespace App;
  
      use Illuminate\Database\Eloquent\Model;
  
      class educ extends Model
      {
          //
          protected $fillable = ['user_id','degree','univ','country','year','research_area'];
      }
  </code></pre>
  
  <p>and the error which i am getting while submitting the form is given.</p>
  
  <p>Integrity constraint violation: 1048 Column 'univ' cannot be null </p>