title: In laravel data is not inserting into database
body: <p>I am new to laravel and doing project using laravel framework please help me to solve this problem.</p>
  
  <p>data is not inserting into table.</p>
  
  <p><strong>routes.php</strong></p>
  
  <pre><code>Route::post('report/save','TestingController@store');
  </code></pre>
  
  <p><strong>TestingController</strong></p>
  
  <pre><code> public function store(Request $request){
          $userId = \Auth::user()-&gt;id;
          $this-&gt;validate($request, [
              'from_stk_loc' =&gt; 'required',
              'testing_date' =&gt; 'required',
              'casting_date' =&gt; 'required',
              'debtor_no' =&gt; 'required',
              'concrete_grade' =&gt; 'required',
              'testing_age' =&gt; 'required',
          ]);
  
          $test_details['client_id'] = $request-&gt;debtor_no;
          $test_details['location'] = $request-&gt;from_stk_loc;
          $test_details['casting_date'] = $request-&gt;casting_date;
          $test_details['testing_date'] = $request-&gt;testing_date;
          $test_details['concrete_grade'] = $request-&gt;concrete_grade;
          $test_details['testing_age'] = $request-&gt;testing_age;
          $test_details['report_date'] = date('Y-m-d');
  
          $test_detailsId = DB::table('testing_report')-&gt;insert($test_details);
  
  
      }
  </code></pre>
  
  <p><strong>Model-> Testing.php</strong></p>
  
  <pre><code>&lt;?php
  
  namespace App\Model;
  use DB;
  use Illuminate\Database\Eloquent\Model;
  
  class Testing extends Model
  {
      protected $table = 'testing_report';
      protected $fillable = [
      'client_id',
      'location',
      'casting_date',
      'testing_date',
      'concrete_grade',
      'testing_age',
  ];
  }
  </code></pre>
  
  <p>Here is my form code, you can review this and find me a solution.</p>
  
  <pre><code>      &lt;div class="col-md-3"&gt;
            &lt;label for="exampleInputEmail1"&gt;{{ trans('message.testing.client') }}&lt;/label&gt;
              &lt;select class="form-control select2" name="client_id" id="client_id"&gt;
                &lt;option value="all"&gt;Select client&lt;/option&gt;
                @foreach($customerData as $data)
            &lt;option value="{{$data-&gt;debtor_no}}"&gt;{{$data-&gt;name}}&lt;/option&gt;
          @endforeach
              &lt;/select&gt;
        &lt;/div&gt;
          &lt;div class="col-md-3"&gt;
        &lt;div class="form-group"&gt;
            &lt;label for="examplefromlocation"&gt;{{ trans('message.form.from_location') }}&lt;/label&gt;
              &lt;select class="form-control select2" name="from_stk_loc" id="from_stk_loc"&gt;
              @foreach($locData as $data)
                &lt;option value="{{$data-&gt;loc_code}}" &lt;?= ($data-&gt;inactive =="1" ? 'selected':'')?&gt;&gt;{{$data-&gt;location_name}}&lt;/option&gt;
              @endforeach
              &lt;/select&gt;
        &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;div class="col-md-3"&gt;
        &lt;div class="form-group"&gt;
          &lt;label&gt;{{ trans('message.table.casting_date') }}&lt;span class="text-danger"&gt; *&lt;/span&gt;&lt;/label&gt;
          &lt;div class="input-group date"&gt;
            &lt;div class="input-group-addon"&gt;
              &lt;i class="fa fa-calendar"&gt;&lt;/i&gt;
            &lt;/div&gt;
            &lt;input class="form-control" id="datepicker" type="text" name="casting_date"&gt;
          &lt;/div&gt;
          &lt;!-- /.input group --&gt;
        &lt;/div&gt;
    &lt;/div&gt;
      &lt;div class="col-md-3"&gt;
        &lt;div class="form-group"&gt;
          &lt;label&gt;{{ trans('message.table.testing_date') }}&lt;span class="text-danger"&gt; *&lt;/span&gt;&lt;/label&gt;
          &lt;div class="input-group date"&gt;
            &lt;div class="input-group-addon"&gt;
              &lt;i class="fa fa-calendar"&gt;&lt;/i&gt;
            &lt;/div&gt;
            &lt;input class="form-control" id="datepicker1" type="text" name="testing_date"&gt;
          &lt;/div&gt;
          &lt;!-- /.input group --&gt;
        &lt;/div&gt;
      &lt;/div&gt;
  
       &lt;div class="col-md-3"&gt;
        &lt;div class="form-group"&gt;
            &lt;label for="examplefromlocation"&gt;{{ trans('message.form.gradeofconcrete') }}&lt;/label&gt;
             &lt;input type="text" placeholder="{{ trans('message.form.gradeofconcrete') }}" class="form-control valdation_check" name="concrete_grade" value=""&gt;
        &lt;/div&gt;
      &lt;/div&gt;
  
         &lt;div class="col-md-3"&gt;
        &lt;div class="form-group"&gt;
            &lt;label for="examplefromlocation"&gt;{{ trans('message.form.testing_age') }}&lt;/label&gt;
             &lt;input type="text" placeholder="{{ trans('message.form.testing_age') }}" class="form-control valdation_check" name="testing_age" value=""&gt;
        &lt;/div&gt;
      &lt;/div&gt;
       &lt;div class="row"&gt;
      &lt;div class="col-md-12"&gt;
        &lt;!-- /.box-header --&gt;
        &lt;div class="box-body no-padding"&gt;
          &lt;div class="table-responsive"&gt;
          &lt;table class="table table-bordered" id="purchaseInvoice"&gt;
            &lt;tbody&gt;
  
            &lt;tr class="tbl_header_color dynamicRows"&gt;
              &lt;th width="5%" class="text-center"&gt;{{ trans('message.table.sno') }}&lt;/th&gt;
              &lt;th width="10%" class="text-center"&gt;{{ trans('message.table.wt') }}&lt;/th&gt;
              &lt;th colspan="2" width="10%" class="text-center"&gt;{{ trans('message.table.load') }}&lt;/th&gt;
              &lt;th colspan="2" width="10%" class="text-center"&gt;Comp Strength in M. Pa&lt;/th&gt;
              &lt;th width="15%" class="text-center"&gt;Avg Strength&lt;/th&gt;
              &lt;th width="15%"  class="text-center"&gt;{{ trans('message.table.remark') }}&lt;/th&gt;
              &lt;th width="5%"  class="text-center"&gt;{{ trans('message.table.action') }}&lt;/th&gt;
            &lt;/tr&gt;
            &lt;tr class="tbl_header_color dynamicRows"&gt;
              &lt;th width="5%" class="text-center"&gt;&lt;/th&gt;
              &lt;th width="10%" class="text-center"&gt;&lt;/th&gt;
              &lt;th width="10%" class="text-center"&gt;{{ trans('message.table.machine') }}&lt;/th&gt;
              &lt;th width="10%" class="text-center"&gt;{{ trans('message.table.calibrated') }}&lt;/th&gt;
              &lt;th width="10%" class="text-center"&gt;7 Day's&lt;/th&gt;
              &lt;th width="10%" class="text-center"&gt;27 Day's&lt;/th&gt;
              &lt;th width="10%" class="text-center"&gt;&lt;/th&gt;
              &lt;th width="15%" class="text-center"&gt;&lt;/th&gt;
              &lt;th width="5%"  class="text-center"&gt;&lt;/th&gt;
            &lt;/tr&gt;
            &lt;tr class="custom-item"&gt;&lt;td class="add-row text-danger"&gt;&lt;strong&gt;Add Custom Item&lt;/strong&gt;&lt;/td&gt;&lt;td colspan="8"&gt;&lt;/td&gt;&lt;/tr&gt;
  
            &lt;/tbody&gt;
          &lt;/table&gt;
          &lt;/div&gt;
          &lt;br&gt;&lt;br&gt;
        &lt;/div&gt;
      &lt;/div&gt;
        &lt;!-- /.box-body --&gt;
        &lt;div class="col-md-12"&gt;
  
          &lt;a href="{{url('/sales/list')}}" class="btn btn-info btn-flat"&gt;{{ trans('message.form.cancel') }}&lt;/a&gt;
          &lt;button type="submit" class="btn btn-primary btn-flat pull-right" id="btnSubmit"&gt;{{ trans('message.form.submit') }}&lt;/button&gt;
        &lt;/div&gt;
  &lt;/div&gt;
     &lt;/form&gt;
  </code></pre>
  
  <p><strong>Problem:</strong></p>
  
  <p>When I click submit button nothing is happening at all.</p>
  
  <p>Any help would be highly appreciated. </p>
  
  <hr>
  
  <p>This is view</p>
  
  <p></p>
  
  <pre><code>          &lt;div class="col-md-3"&gt;
                &lt;label for="exampleInputEmail1"&gt;{{ trans('message.testing.client') }}&lt;/label&gt;
                  &lt;select class="form-control select2" name="client_id" id="client_id"&gt;
                    &lt;option value="all"&gt;Select client&lt;/option&gt;
                    @foreach($customerData as $data)
                &lt;option value="{{$data-&gt;debtor_no}}"&gt;{{$data-&gt;name}}&lt;/option&gt;
              @endforeach
                  &lt;/select&gt;
            &lt;/div&gt;
              &lt;div class="col-md-3"&gt;
            &lt;div class="form-group"&gt;
                &lt;label for="examplefromlocation"&gt;{{ trans('message.form.from_location') }}&lt;/label&gt;
                  &lt;select class="form-control select2" name="from_stk_loc" id="from_stk_loc"&gt;
                  @foreach($locData as $data)
                    &lt;option value="{{$data-&gt;loc_code}}" &lt;?= ($data-&gt;inactive =="1" ? 'selected':'')?&gt;&gt;{{$data-&gt;location_name}}&lt;/option&gt;
                  @endforeach
                  &lt;/select&gt;
            &lt;/div&gt;
          &lt;/div&gt;
  
          &lt;div class="col-md-3"&gt;
            &lt;div class="form-group"&gt;
              &lt;label&gt;{{ trans('message.table.casting_date') }}&lt;span class="text-danger"&gt; *&lt;/span&gt;&lt;/label&gt;
              &lt;div class="input-group date"&gt;
                &lt;div class="input-group-addon"&gt;
                  &lt;i class="fa fa-calendar"&gt;&lt;/i&gt;
                &lt;/div&gt;
                &lt;input class="form-control" id="datepicker" type="text" name="casting_date"&gt;
              &lt;/div&gt;
              &lt;!-- /.input group --&gt;
            &lt;/div&gt;
        &lt;/div&gt;
          &lt;div class="col-md-3"&gt;
            &lt;div class="form-group"&gt;
              &lt;label&gt;{{ trans('message.table.testing_date') }}&lt;span class="text-danger"&gt; *&lt;/span&gt;&lt;/label&gt;
              &lt;div class="input-group date"&gt;
                &lt;div class="input-group-addon"&gt;
                  &lt;i class="fa fa-calendar"&gt;&lt;/i&gt;
                &lt;/div&gt;
                &lt;input class="form-control" id="datepicker1" type="text" name="testing_date"&gt;
              &lt;/div&gt;
              &lt;!-- /.input group --&gt;
            &lt;/div&gt;
          &lt;/div&gt;
  
           &lt;div class="col-md-3"&gt;
            &lt;div class="form-group"&gt;
                &lt;label for="examplefromlocation"&gt;{{ trans('message.form.gradeofconcrete') }}&lt;/label&gt;
                 &lt;input type="text" placeholder="{{ trans('message.form.gradeofconcrete') }}" class="form-control valdation_check" name="concrete_grade" value=""&gt;
            &lt;/div&gt;
          &lt;/div&gt;
  
             &lt;div class="col-md-3"&gt;
            &lt;div class="form-group"&gt;
                &lt;label for="examplefromlocation"&gt;{{ trans('message.form.testing_age') }}&lt;/label&gt;
                 &lt;input type="text" placeholder="{{ trans('message.form.testing_age') }}" class="form-control valdation_check" name="testing_age" value=""&gt;
            &lt;/div&gt;
          &lt;/div&gt;
           &lt;div class="row"&gt;
          &lt;div class="col-md-12"&gt;
            &lt;!-- /.box-header --&gt;
            &lt;div class="box-body no-padding"&gt;
              &lt;div class="table-responsive"&gt;
              &lt;table class="table table-bordered" id="purchaseInvoice"&gt;
                &lt;tbody&gt;
  
                &lt;tr class="tbl_header_color dynamicRows"&gt;
                  &lt;th width="5%" class="text-center"&gt;{{ trans('message.table.sno') }}&lt;/th&gt;
                  &lt;th width="10%" class="text-center"&gt;{{ trans('message.table.wt') }}&lt;/th&gt;
                  &lt;th colspan="2" width="10%" class="text-center"&gt;{{ trans('message.table.load') }}&lt;/th&gt;
                  &lt;th colspan="2" width="10%" class="text-center"&gt;Comp Strength in M. Pa&lt;/th&gt;
                  &lt;th width="15%" class="text-center"&gt;Avg Strength&lt;/th&gt;
                  &lt;th width="15%"  class="text-center"&gt;{{ trans('message.table.remark') }}&lt;/th&gt;
                  &lt;th width="5%"  class="text-center"&gt;{{ trans('message.table.action') }}&lt;/th&gt;
                &lt;/tr&gt;
                &lt;tr class="tbl_header_color dynamicRows"&gt;
                  &lt;th width="5%" class="text-center"&gt;&lt;/th&gt;
                  &lt;th width="10%" class="text-center"&gt;&lt;/th&gt;
                  &lt;th width="10%" class="text-center"&gt;{{ trans('message.table.machine') }}&lt;/th&gt;
                  &lt;th width="10%" class="text-center"&gt;{{ trans('message.table.calibrated') }}&lt;/th&gt;
                  &lt;th width="10%" class="text-center"&gt;7 Day's&lt;/th&gt;
                  &lt;th width="10%" class="text-center"&gt;27 Day's&lt;/th&gt;
                  &lt;th width="10%" class="text-center"&gt;&lt;/th&gt;
                  &lt;th width="15%" class="text-center"&gt;&lt;/th&gt;
                  &lt;th width="5%"  class="text-center"&gt;&lt;/th&gt;
                &lt;/tr&gt;
                &lt;tr class="custom-item"&gt;&lt;td class="add-row text-danger"&gt;&lt;strong&gt;Add Custom Item&lt;/strong&gt;&lt;/td&gt;&lt;td colspan="8"&gt;&lt;/td&gt;&lt;/tr&gt;
  
                &lt;/tbody&gt;
              &lt;/table&gt;
              &lt;/div&gt;
              &lt;br&gt;&lt;br&gt;
            &lt;/div&gt;
          &lt;/div&gt;
            &lt;!-- /.box-body --&gt;
            &lt;div class="col-md-12"&gt;
  
              &lt;a href="{{url('/sales/list')}}" class="btn btn-info btn-flat"&gt;{{ trans('message.form.cancel') }}&lt;/a&gt;
              &lt;button type="submit" class="btn btn-primary btn-flat pull-right" id="btnSubmit"&gt;{{ trans('message.form.submit') }}&lt;/button&gt;
            &lt;/div&gt;
      &lt;/div&gt;
         &lt;/form&gt;
  </code></pre>