title: General error:1364 :Field 'dis' does not have a default value
body: <p>I am getting error 1364. Field 'dis' does not have a default value. I am going well with form and CRUD operation. In saving data in the database through form I got this error. Create form redirects to show view. I got this error when I click on the submit button of my form. I check my database data is not stored there.</p>
  <p>Error:</p>
  <pre><code>Illuminate\Database\QueryException
  SQLSTATE[HY000]: General error: 1364 Field 'dis' doesn't have a default value (SQL: insert into 
  `students` (`full_name`, `dob`, `gender`, `cnic`, `marital_Status`, `nationality`, `religion`, 
  `domicile`, `province`, `father_name`, `father_cnic`, `father_profession`, `guardian_name`, 
  `guardian_cnic`, `email`, `address`, `tel_landline`, `tel_office`, `cell1`, `cell2`, 
  `matric_obtained_marks`, `matric_total_marks`, `matric_marksheet_image`, `fsc_obtained_marks`, 
  `fsc_total_marks`, `fsc_marksheet_image`, `nmdcat_obtained_marks`, `nmdcat_total_marks`, 
   `nmdcat_result_image`, `updated_at`,
  </code></pre>
  <p>Here is my controller</p>
  <pre><code>class StudentsController extends Controller 
  {
  /**
   * Display a listing of the resource.
   *
   * @return \Illuminate\Http\Response
   */
   public function index()
   {
       return view ('index');
   }
  
   /**
   * Show the form for creating a new resource.
   *
   * @return \Illuminate\Http\Response
   */
   public function create()
   {
       return view('create');
   }
  
   /**
   * Store a newly created resource in storage.
   *
   * @param  \Illuminate\Http\Request  $request
   * @return \Illuminate\Http\Response
   */
  public function store(Request $request)
  {
    $student= new student;
    $student-&gt;full_name=$request-&gt;full_name;
    $student-&gt;dob=$request-&gt;dob;
    $student-&gt;gender=$request-&gt;dis;
    $student-&gt;cnic=$request-&gt;cnic;
    $student-&gt;marital_Status=$request-&gt;marital_status;
    $student-&gt;nationality=$request-&gt;nationality;
    $student-&gt;religion=$request-&gt;religion;
    $student-&gt;domicile=$request-&gt;domicile;
    $student-&gt;province=$request-&gt;province;
    $student-&gt;father_name=$request-&gt;father_name;
    $student-&gt;father_cnic=$request-&gt;father_cnic;
    $student-&gt;father_profession=$request-&gt;father_profession;
    $student-&gt;guardian_name=$request-&gt;guardian_name;
    $student-&gt;guardian_cnic=$request-&gt;guardian_cnic;
    $student-&gt;email=$request-&gt;email;
    $student-&gt;address=$request-&gt;address;
    $student-&gt;tel_landline=$request-&gt;tel_lanline;
    $student-&gt;tel_office=$request-&gt;tel_office;
    $student-&gt;cell1=$request-&gt;cell1;
    $student-&gt;cell2=$request-&gt;cell2;
    $student-&gt;matric_obtained_marks=$request-&gt;matric_obtained_marks;
    $student-&gt;matric_total_marks=$request-&gt;matric_total_marks;
    $student-&gt;matric_marksheet_image=$request-&gt;matric_marksheet_image;
    $student-&gt;fsc_obtained_marks=$request-&gt;fsc_obtained_marks;
    $student-&gt;fsc_total_marks=$request-&gt;fsc_total_marks;
    $student-&gt;fsc_marksheet_image=$request-&gt;fsc_marksheet_image;
    $student-&gt;nmdcat_obtained_marks=$request-&gt;nmdcat_obtained_marks;
    $student-&gt;nmdcat_total_marks=$request-&gt;nmdcat_total_marks;
    $student-&gt;nmdcat_result_image=$request-&gt;nmdcat_result_image;
    $student-&gt;save();
  
    return redirect('/show');
  
  }
  </code></pre>
  <p>Here is my form</p>
  <pre><code>                &lt;form action=&quot;/students&quot; method=&quot;post&quot;&gt;
        {{csrf_field()}}
                  &lt;div class=&quot;form-group col-md-9&quot;&gt;
                  &lt;label for=&quot;exampleFormControlInput1&quot;&gt;Name of applicant:&lt;/label&gt;
                  &lt;input type=&quot;text&quot; class=&quot;form-control&quot; id=&quot;exampleFormControlInput1&quot; name=&quot;full_name&quot; placeholder=&quot;Enter your full name&quot; required&gt;
                  &lt;/div&gt;
  
                  &lt;div class=&quot;form-row&quot;&gt;
                      &lt;div class=&quot;form-group col-md-6&quot;&gt;
                        &lt;label for=&quot;example-date-input&quot; class=&quot;col-6 col-form-label&quot;&gt;Date of Birth:&lt;/label&gt;
                          &lt;div class=&quot;col-8&quot;&gt;
                              &lt;input class=&quot;form-control&quot; type=&quot;date&quot; value=&quot;2001-05-19&quot; id=&quot;example-date-input&quot; name=&quot;dob&quot; required&gt;
                      &lt;/div&gt;
                      &lt;/div&gt;
                      &lt;div class=&quot;form-group col-md-6&quot; id=&quot;gen&quot;&gt;
                       &lt;label for=&quot;example-date-input&quot; class=&quot;col-3 col-form-label&quot; id=&quot;gender&quot;&gt;Gender:&lt;/label&gt;
                       &lt;div class=&quot;col-9&quot; id=&quot;gnd&quot;&gt;
                        &lt;div class=&quot;form-check form-check-inline&quot;&gt;
                          &lt;label class=&quot;form-check-label&quot;&gt;
                              &lt;input class=&quot;form-check-input&quot; type=&quot;radio&quot; name=&quot;gender&quot; id=&quot;inlineRadio1&quot; value=&quot;male&quot;&gt; Male
                          &lt;/label&gt;
                          &lt;/div&gt;
                          &lt;div class=&quot;form-check form-check-inline&quot; id=&quot;fma&quot;&gt;
                              &lt;label class=&quot;form-check-label&quot;&gt;
                                  &lt;input class=&quot;form-check-input&quot; type=&quot;radio&quot; name=&quot;gender&quot; id=&quot;inlineRadio2&quot; value=&quot;female&quot;&gt; Female
                              &lt;/label&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                      &lt;/div&gt;
                      &lt;div class=&quot;form-group col-md-4&quot; id=&quot;dis&quot;&gt;
                        &lt;label for=&quot;exampleFormControlInput1&quot; class=&quot;col-2 col-form-label&quot;&gt;Disability:&lt;/label&gt;
                          &lt;div class=&quot;col-7&quot;&gt;
                              &lt;input class=&quot;form-control&quot; type=&quot;text&quot; id=&quot;exampleFormControlInput1&quot; name=&quot;dis&quot; required&gt;
                      &lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;div class=&quot;form-group col-md-9&quot;&gt;
                      &lt;label for=&quot;exampleFormControlInput1&quot;&gt;CNIC:&lt;/label&gt;
                      &lt;input type=&quot;text&quot; class=&quot;form-control&quot; id=&quot;exampleFormControlInput1&quot; name=&quot;cnic&quot; placeholder=&quot;Enter your CNIC&quot; required&gt;
                  &lt;/div&gt;
                  &lt;div class=&quot;form-row&quot;&gt;
                    &lt;div class=&quot;form-group col-md-6&quot;&gt;
                    &lt;label for=&quot;example-date-input&quot; class=&quot;col-6 col-form-label&quot;&gt;Marital Status:&lt;/label&gt;
                          &lt;div class=&quot;col-6&quot;&gt;
                              &lt;input class=&quot;form-control&quot; type=&quot;text&quot; name=&quot;marital_status&quot;&gt;
                      &lt;/div&gt;
                      &lt;/div&gt;
                      &lt;div class=&quot;form-group col-md-5&quot; id=&quot;nat&quot;&gt;
                    &lt;label for=&quot;example-date-input&quot; class=&quot;col-4 col-form-label&quot;&gt;Nationality:&lt;/label&gt;
                          &lt;div class=&quot;col-7&quot;&gt;
                              &lt;input class=&quot;form-control&quot; type=&quot;text&quot; name=&quot;nationality&quot; required&gt;
                      &lt;/div&gt;
                      &lt;/div&gt;
                      &lt;div class=&quot;form-group col-md-5&quot; id=&quot;rel&quot;&gt;
                    &lt;label for=&quot;example-date-input&quot; class=&quot;col-4 col-form-label&quot;&gt;Religion:&lt;/label&gt;
                          &lt;div class=&quot;col-7&quot;&gt;
                              &lt;input class=&quot;form-control&quot; type=&quot;text&quot; name=&quot;religion&quot; required&gt;
                      &lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;div class=&quot;form-row&quot;&gt;
                      &lt;div class=&quot;form-group col-md-6&quot;&gt;
                      &lt;label for=&quot;example-date-input&quot; class=&quot;col-4 col-form-label&quot;&gt;Domicile:&lt;/label&gt;
                      &lt;div class=&quot;col-7&quot;&gt;
                          &lt;input class=&quot;form-control&quot; type=&quot;text&quot; name=&quot;domicile&quot; placeholder=&quot;Your domicile&quot; required&gt;
                      &lt;/div&gt;
                      &lt;/div&gt;
                      &lt;div class=&quot;form-group col-md-6&quot; id=&quot;dom&quot;&gt;
                      &lt;label for=&quot;example-date-input&quot; class=&quot;col-4 col-form-label&quot;&gt;Province:&lt;/label&gt;
                      &lt;div class=&quot;col-7&quot;&gt;
                          &lt;input class=&quot;form-control&quot; type=&quot;text&quot; name=&quot;province&quot; placeholder=&quot;Your province&quot; required&gt;
                      &lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;div class=&quot;form-group col-md-9&quot;&gt;
                      &lt;label for=&quot;exampleFormControlInput1&quot;&gt;Father Name:&lt;/label&gt;
                      &lt;input type=&quot;text&quot; class=&quot;form-control&quot; id=&quot;exampleFormControlInput1&quot; name=&quot;father_name&quot; placeholder=&quot;Enter your father name&quot; required&gt;
                  &lt;/div&gt;
                  &lt;div class=&quot;form-group col-md-9&quot;&gt;
                      &lt;label for=&quot;exampleFormControlInput1&quot;&gt;Father CNIC:&lt;/label&gt;
                      &lt;input type=&quot;text&quot; class=&quot;form-control&quot; id=&quot;exampleFormControlInput1&quot; name=&quot;father_cnic&quot; placeholder=&quot;Enter father CNIC&quot; required&gt;
                  &lt;/div&gt;
                  &lt;div class=&quot;form-group col-md-9&quot;&gt;
                      &lt;label for=&quot;exampleFormControlInput1&quot;&gt;Father Profession:&lt;/label&gt;
                      &lt;input type=&quot;text&quot; class=&quot;form-control&quot; id=&quot;exampleFormControlInput1&quot; name=&quot;father_profession&quot; placeholder=&quot;Enter father profession&quot; required&gt;
                  &lt;/div&gt;
                  &lt;div class=&quot;form-group col-md-9&quot;&gt;
                      &lt;label for=&quot;exampleFormControlInput1&quot;&gt;Guardian Name:&lt;/label&gt;
                      &lt;input type=&quot;text&quot; class=&quot;form-control&quot; id=&quot;exampleFormControlInput1&quot; name=&quot;guardian_name&quot; placeholder=&quot;Enter your guardian name&quot; required&gt;
                  &lt;/div&gt;
                  &lt;div class=&quot;form-group col-md-9&quot;&gt;
                      &lt;label for=&quot;exampleFormControlInput1&quot;&gt;Guardian CNIC:&lt;/label&gt;
                      &lt;input type=&quot;text&quot; class=&quot;form-control&quot; id=&quot;exampleFormControlInput1&quot; name=&quot;guardian_cnic&quot; placeholder=&quot;Enter guardian CNIC&quot; required&gt;
                  &lt;/div&gt;
                  &lt;div class=&quot;form-group col-md-9&quot;&gt;
                      &lt;label for=&quot;exampleFormControlInput1&quot;&gt;Email Address:&lt;/label&gt;
                      &lt;input type=&quot;email&quot; class=&quot;form-control&quot; id=&quot;exampleFormControlInput1&quot; name=&quot;email&quot; placeholder=&quot;Enter your email address&quot; required&gt;
                  &lt;/div&gt;
                  &lt;div class=&quot;form-group col-md-9&quot;&gt;
                      &lt;label for=&quot;exampleFormControlTextarea1&quot;&gt;Permanent and Mailing Address:&lt;/label&gt;
                      &lt;textarea class=&quot;form-control&quot; id=&quot;exampleFormControlTextarea1&quot; rows=&quot;5&quot; name=&quot;address&quot; placeholder=&quot;Enter your address&quot; required&gt;&lt;/textarea&gt;
                  &lt;/div&gt;
                  &lt;div class=&quot;form-row&quot;&gt;
                      &lt;div class=&quot;form-group col-md-8&quot;&gt;
                          &lt;label for=&quot;example-date-input&quot; class=&quot;col-5 col-form-label&quot;&gt;Tel (Landline):&lt;/label&gt;
                          &lt;div class=&quot;col-5&quot;&gt;
                              &lt;input class=&quot;form-control&quot; type=&quot;tel&quot; name=&quot;tel_landline&quot; placeholder=&quot;Landline&quot;&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                      &lt;div class=&quot;form-group col-md-8&quot; id=&quot;tel1&quot;&gt;
                          &lt;label for=&quot;example-date-input&quot; class=&quot;col-5 col-form-label&quot;&gt;Tel (Office):&lt;/label&gt;
                          &lt;div class=&quot;col-5&quot;&gt;
                              &lt;input class=&quot;form-control&quot; type=&quot;tel&quot; name=&quot;tel_office&quot; placeholder=&quot;Office&quot;&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;div class=&quot;form-row&quot;&gt;
                      &lt;div class=&quot;form-group col-md-7&quot;&gt;
                          &lt;label for=&quot;example-date-input&quot; class=&quot;col-4 col-form-label&quot;&gt;Cell 1:&lt;/label&gt;
                          &lt;div class=&quot;col-7&quot;&gt;
                              &lt;input class=&quot;form-control&quot; type=&quot;tel&quot; name=&quot;cell1&quot; placeholder=&quot;0***-*******&quot; required&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                      &lt;div class=&quot;form-group col-md-7&quot; id=&quot;cell2&quot;&gt;
                          &lt;label for=&quot;example-date-input&quot; class=&quot;col-4 col-form-label&quot;&gt;Cell 2:&lt;/label&gt;
                          &lt;div class=&quot;col-7&quot;&gt;
                              &lt;input class=&quot;form-control&quot; type=&quot;tel&quot; name=&quot;cell2&quot; placeholder=&quot;0***-*******&quot; required&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;label id=&quot;mat&quot;&gt;Matric/O Level Marks:&lt;/label&gt;
                  &lt;div class=&quot;form-row&quot; id=&quot;mar&quot;&gt;
                      &lt;br&gt;
                      &lt;div class=&quot;form-group col-md-8&quot;&gt;
                          &lt;label for=&quot;example-date-input&quot; class=&quot;col-5 col-form-label&quot;&gt;Obtained Marks:&lt;/label&gt;
                          &lt;div class=&quot;col-5&quot;&gt;
                              &lt;input class=&quot;form-control&quot; type=&quot;number&quot; name=&quot;matric_obtained_marks&quot; required&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                      &lt;div class=&quot;form-group col-md-8&quot; id=&quot;tom&quot;&gt;
                          &lt;label for=&quot;example-date-input&quot; class=&quot;col-5 col-form-label&quot;&gt;Total Marks:&lt;/label&gt;
                          &lt;div class=&quot;col-5&quot;&gt;
                              &lt;input class=&quot;form-control&quot; type=&quot;number&quot; max=&quot;1100&quot; name=&quot;matric_total_marks&quot; required&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;label id=&quot;mat&quot;&gt;Matric/O Level Marksheet:&lt;/label&gt;
                  &lt;div class=&quot;input-group col-md-9&quot;&gt;
                      &lt;div class=&quot;custom-file&quot;&gt;
                      &lt;input type=&quot;file&quot; class=&quot;custom-file-input&quot; id=&quot;inputGroupFile04&quot; name=&quot;matric_marksheet_image&quot; &gt;
                      &lt;label class=&quot;custom-file-label&quot; for=&quot;inputGroupFile04&quot;&gt;Choose file&lt;/label&gt;
                      &lt;/div&gt;
                      &lt;div class=&quot;input-group-append&quot;&gt;
                      &lt;button type=&quot;button&quot; class=&quot;btn btn-primary&quot; id=&quot;upl&quot;&gt;Upload&lt;/button&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;small id=&quot;mat&quot; class=&quot;form-text text-muted&quot;&gt;Upload scanned picture of your Matric/O Level marksheet&lt;/small&gt;
                  &lt;br&gt;
                  &lt;label id=&quot;mat&quot;&gt;FSc/A-Level Marks:&lt;/label&gt;
                  &lt;div class=&quot;form-row&quot; id=&quot;mar&quot;&gt;
                      &lt;br&gt;
                          &lt;div class=&quot;form-group col-md-8&quot;&gt;
                        &lt;label for=&quot;example-date-input&quot; class=&quot;col-5 col-form-label&quot;&gt;Obtained Marks:&lt;/label&gt;
                              &lt;div class=&quot;col-5&quot;&gt;
                                  &lt;input class=&quot;form-control&quot; type=&quot;number&quot; name=&quot;fsc_obtained_marks&quot; required&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                      &lt;div class=&quot;form-group col-md-8&quot; id=&quot;tom&quot;&gt;
                        &lt;label for=&quot;example-date-input&quot; class=&quot;col-5 col-form-label&quot;&gt;Total Marks:&lt;/label&gt;
                              &lt;div class=&quot;col-5&quot;&gt;
                                  &lt;input class=&quot;form-control&quot; type=&quot;number&quot; max=&quot;1100&quot; name=&quot;fsc_total_marks&quot; required&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;label id=&quot;mat&quot;&gt;FSc/A-Level Marksheet:&lt;/label&gt;
                  &lt;div class=&quot;input-group col-md-9&quot;&gt;
                    &lt;div class=&quot;custom-file&quot;&gt;
                      &lt;input type=&quot;file&quot; class=&quot;custom-file-input&quot; id=&quot;inputGroupFile04&quot; name=&quot;fsc_marksheet_image&quot; &gt;
                      &lt;label class=&quot;custom-file-label&quot; for=&quot;inputGroupFile04&quot;&gt;Choose file&lt;/label&gt;
                    &lt;/div&gt;
                    &lt;div class=&quot;input-group-append&quot;&gt;
                      &lt;button type=&quot;button&quot; class=&quot;btn btn-primary&quot; id=&quot;upl&quot;&gt;Upload&lt;/button&gt;
                    &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;small id=&quot;mat&quot; class=&quot;form-text text-muted&quot;&gt;Upload scanned picture of your FSc/A-Level marksheet&lt;/small&gt;
                  &lt;br&gt;
                  &lt;label id=&quot;mat&quot;&gt;NMDCAT Marks:&lt;/label&gt;
                  &lt;div class=&quot;form-row&quot; id=&quot;mar&quot;&gt;
                      &lt;br&gt;
                          &lt;div class=&quot;form-group col-md-8&quot;&gt;
                        &lt;label for=&quot;example-date-input&quot; class=&quot;col-5 col-form-label&quot;&gt;Obtained Marks:&lt;/label&gt;
                              &lt;div class=&quot;col-5&quot;&gt;
                                  &lt;input class=&quot;form-control&quot; type=&quot;number&quot; name=&quot;nmdcat_obtained_marks&quot; required&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                      &lt;div class=&quot;form-group col-md-8&quot; id=&quot;tom&quot;&gt;
                        &lt;label for=&quot;example-date-input&quot; class=&quot;col-5 col-form-label&quot;&gt;Total Marks:&lt;/label&gt;
                              &lt;div class=&quot;col-5&quot;&gt;
                                  &lt;input class=&quot;form-control&quot; type=&quot;number&quot; name=&quot;nmdcat_total_marks&quot; required&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;label id=&quot;mat&quot;&gt;NMDCAT Result:&lt;/label&gt;
                  &lt;div class=&quot;input-group col-md-9&quot;&gt;
                    &lt;div class=&quot;custom-file&quot;&gt;
                      &lt;input type=&quot;file&quot; class=&quot;custom-file-input&quot; id=&quot;inputGroupFile04&quot;&gt;
                      &lt;label class=&quot;custom-file-label&quot; for=&quot;inputGroupFile04&quot; name=&quot;nmdcat_result_image&quot; &gt;Choose file&lt;/label&gt;
                    &lt;/div&gt;
                    &lt;div class=&quot;input-group-append&quot;&gt;
                      &lt;button type=&quot;button&quot; class=&quot;btn btn-primary&quot; id=&quot;upl&quot;&gt;Upload&lt;/button&gt;
                    &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;small id=&quot;mat&quot; class=&quot;form-text text-muted&quot;&gt;Upload scanned picture of your NMDCAT result&lt;/small&gt;
                  &lt;br&gt;
                  &lt;button type=&quot;submit&quot; class=&quot;btn btn-success col-md-2&quot; id=&quot;sig&quot; align=&quot;center&quot; center&gt;Submit&lt;/button&gt;
              &lt;/form&gt;
          &lt;/div&gt;
          @endsection
  </code></pre>
  <p>Here is my migration:</p>
  <pre><code>public function up()
  {
      Schema::create('students', function (Blueprint $table) {
          $table-&gt;id();
          $table-&gt;string('full_name');
          $table-&gt;date('dob');
          $table-&gt;text('gender');
          $table-&gt;text('dis');
          $table-&gt;biginteger('cnic');
          $table-&gt;text('marital_status');
          $table-&gt;text('nationality');
          $table-&gt;text('religion');
          $table-&gt;text('domicile');
          $table-&gt;text('province');
          $table-&gt;text('father_name');
          $table-&gt;biginteger('father_cnic');
          $table-&gt;text('father_profession');
          $table-&gt;text('guardian_name');
          $table-&gt;biginteger('guardian_cnic');
          $table-&gt;text('email');
          $table-&gt;text('address');
          $table-&gt;biginteger('tel_landline');
          $table-&gt;biginteger('tel_office');
          $table-&gt;biginteger('cell1');
          $table-&gt;biginteger('cell2');
          $table-&gt;integer('matric_obtained_marks');
          $table-&gt;integer('matric_total_marks');
          $table-&gt;binary('matric_marksheet_image');
          $table-&gt;integer('fsc_obtained_marks');
          $table-&gt;integer('fsc_total_marks');
          $table-&gt;binary('fsc_marksheet_image');
          $table-&gt;integer('nmdcat_obtained_marks');
          $table-&gt;integer('nmdcat_total_marks');
          $table-&gt;binary('nmdcat_result_image');
          $table-&gt;timestamps();
      });
  }
  </code></pre>