久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    1. <legend id='RfOdX'><style id='RfOdX'><dir id='RfOdX'><q id='RfOdX'></q></dir></style></legend>

        <bdo id='RfOdX'></bdo><ul id='RfOdX'></ul>

      <i id='RfOdX'><tr id='RfOdX'><dt id='RfOdX'><q id='RfOdX'><span id='RfOdX'><b id='RfOdX'><form id='RfOdX'><ins id='RfOdX'></ins><ul id='RfOdX'></ul><sub id='RfOdX'></sub></form><legend id='RfOdX'></legend><bdo id='RfOdX'><pre id='RfOdX'><center id='RfOdX'></center></pre></bdo></b><th id='RfOdX'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='RfOdX'><tfoot id='RfOdX'></tfoot><dl id='RfOdX'><fieldset id='RfOdX'></fieldset></dl></div>
    2. <tfoot id='RfOdX'></tfoot>
      1. <small id='RfOdX'></small><noframes id='RfOdX'>

        數(shù)據(jù)僅在 Laravel 應用程序中插入最后一個數(shù)組

        Data inserts the last array only in a Laravel app(數(shù)據(jù)僅在 Laravel 應用程序中插入最后一個數(shù)組)

        • <bdo id='wQp1A'></bdo><ul id='wQp1A'></ul>
          1. <small id='wQp1A'></small><noframes id='wQp1A'>

            <i id='wQp1A'><tr id='wQp1A'><dt id='wQp1A'><q id='wQp1A'><span id='wQp1A'><b id='wQp1A'><form id='wQp1A'><ins id='wQp1A'></ins><ul id='wQp1A'></ul><sub id='wQp1A'></sub></form><legend id='wQp1A'></legend><bdo id='wQp1A'><pre id='wQp1A'><center id='wQp1A'></center></pre></bdo></b><th id='wQp1A'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='wQp1A'><tfoot id='wQp1A'></tfoot><dl id='wQp1A'><fieldset id='wQp1A'></fieldset></dl></div>
              <tbody id='wQp1A'></tbody>

                <tfoot id='wQp1A'></tfoot>

                <legend id='wQp1A'><style id='wQp1A'><dir id='wQp1A'><q id='wQp1A'></q></dir></style></legend>
                  本文介紹了數(shù)據(jù)僅在 Laravel 應用程序中插入最后一個數(shù)組的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我有這個月的天數(shù)列表.但問題是當我插入或添加數(shù)據(jù)時,它只輸入了列表中的最后一個數(shù)組或數(shù)據(jù).例如,我添加 Jan-02-2019, 然后它會插入 Jan-31-2019.

                  控制器

                  公共函數(shù)insertSchedule(Request $request){$employeeTimeSet = 新時間表;$employeeTimeSet->employee_no = $request->input('hidEmployeeno');$employeeTimeSet->last_name = $request->input('hidEmployeeLast');$employeeTimeSet->first_name = $request->input('hidEmployeeFirst');$employeeTimeSet->date_today = $request->input('dateToday');$employeeTimeSet->time_in = $request->input('timeIn');$employeeTimeSet->time_out = $request->input('timeOut');$employeeTimeSet->save();}

                  這是視圖和表單:

                  {!!Form::open(['action' => 'AdminEmployeeFilemController@insertSchedule', 'method' => 'POST']) !!}<div class="row"><div class="form-group col-md-12"><small>員工編號和姓名:</small><b><i>{{ $employee->employee_no }} : {{ $employee->last_name }}, {{ $employee->first_name }}</i></b><input type="hidden" name="hidEmployeeno" value='<?php echo $employee->employee_no ?>'><input type="hidden" name="hidEmployeeLast" value='<?php echo $employee->last_name ?>'><input type="hidden" name="hidEmployeeFirst" value='<?php echo $employee->first_name ?>'><小時>

                  @php$今天=今天();$dates = [];for($i=1; $i <$today->daysInMonth + 1; ++$i) {$dates[] = CarbonCarbon::createFromDate($today->year, $today->month, $i)->format('F-d-Y');}@endphp<table class="table"><頭><tr><今天>今天</th><th>TIME IN</th><th>超時</th><th>Action</th></tr></thead>@foreach($dates 作為 $date)<tr><td><b>{{ $date }}</b></td><input type="hidden" name="dateToday" value="{{ $date }}"><td><input type="time" name="timeIn" class="form-control col-md-10"></td><td><input type="time" name="timeOut" class="form-control col-md-10"></td><td>{{Form::button('<i class="fa fa-clock">&nbsp;&nbsp;SET TIME</i>',['type' => 'submit','class' => 'btn btn-warning btn-sm', 'style'=>"display: inline-block;"])}}</td></tr>@endforeach</tbody>{!!表單::關閉() !!}

                  解決方案

                  我認為這是因為您構建 HTML 表單的方式.如果我正確理解了您的問題,以下內容應該可以解決問題:

                  @php$今天=今天();$dates = [];for($i=1; $i <$today->daysInMonth + 1; ++$i) {$dates[] = CarbonCarbon::createFromDate($today->year, $today->month, $i)->format('F-d-Y');}@endphp<div class="row"><div class="form-group col-md-12"><small>員工編號和姓名:</small><b><i>{{ $employee->employee_no }} : {{ $employee->last_name }}, {{ $employee->first_name }}</i></b><小時>

                  <table class="table"><頭><tr><今天>今天</th><th>TIME IN</th><th>超時</th><th>Action</th></tr></thead>@foreach($dates 作為 $date){!!Form::open(['action' => 'AdminEmployeeFilemController@insertSchedule', 'method' => 'POST']) !!}<input type="hidden" name="hidEmployeeno" value="{{ $employee->employee_no }}"><input type="hidden" name="hidEmployeeLast" value="{{ $employee->last_name }}"><input type="hidden" name="hidEmployeeFirst" value="{{ $employee->first_name }}"><tr><td><b>{{ $date }}</b></td><input type="hidden" name="dateToday" value="{{ $date }}"><td><input type="time" name="timeIn" class="form-control col-md-10"></td><td><input type="time" name="timeOut" class="form-control col-md-10"></td><td>{{ Form::button('<i class="fa fa-clock">&nbsp;&nbsp;SET TIME</i>',['type' => 'submit','class' => 'btn btn-warning btn-sm', 'style'=>"display: inline-block;"]) }}</td></tr>{!!表單::關閉() !!}@endforeach</tbody>

                  I have a list of days for this month. But the problem is when I insert or add the data it only entered the last array or data from the list. For example, I add Jan-02-2019, and it will then insert Jan-31-2019.

                  Controller

                  public function insertSchedule(Request $request)
                  {
                      $employeeTimeSet = new Schedule;
                      $employeeTimeSet->employee_no = $request->input('hidEmployeeno');
                      $employeeTimeSet->last_name = $request->input('hidEmployeeLast');
                      $employeeTimeSet->first_name = $request->input('hidEmployeeFirst');
                      $employeeTimeSet->date_today = $request->input('dateToday');
                      $employeeTimeSet->time_in = $request->input('timeIn');
                      $employeeTimeSet->time_out = $request->input('timeOut');
                      $employeeTimeSet->save();
                  }
                  

                  Here are the view and form:

                  {!! Form::open(['action' => 'AdminEmployeeFilemController@insertSchedule', 'method' => 'POST']) !!}
                  <div class="row">
                      <div class="form-group col-md-12">
                          <small>Employee No. and Name:</small>
                          <b><i> {{ $employee->employee_no }} : {{ $employee->last_name }}, {{ $employee->first_name }}</i></b>
                          <input type="hidden" name="hidEmployeeno" value='<?php echo $employee->employee_no ?>'>
                          <input type="hidden" name="hidEmployeeLast" value='<?php echo $employee->last_name ?>'>
                          <input type="hidden" name="hidEmployeeFirst" value='<?php echo $employee->first_name ?>'>
                          <hr>
                      </div>
                  </div>
                  @php
                      $today = today(); 
                      $dates = []; 
                  
                      for($i=1; $i < $today->daysInMonth + 1; ++$i) {
                          $dates[] = CarbonCarbon::createFromDate($today->year, $today->month, $i)->format('F-d-Y');
                      }
                  @endphp
                  
                  <table class="table">
                      <thead>
                      <tr>
                          <th>DATE TODAY</th>
                          <th>TIME IN</th>
                          <th>TIME OUT</th>
                          <th>ACTION</th>
                      </tr>
                      </thead>
                      <tbody>
                      @foreach($dates as $date)
                          <tr>
                              <td><b>{{ $date }}</b></td>
                              <input type="hidden" name="dateToday" value="{{ $date }}">
                              <td><input type="time" name="timeIn" class="form-control col-md-10"></td>
                              <td><input type="time" name="timeOut" class="form-control col-md-10"></td>
                              <td>{{Form::button('<i class="fa fa-clock">&nbsp;&nbsp;SET TIME</i>',['type' => 'submit','class' => 'btn btn-warning btn-sm',  'style'=>"display: inline-block;"])}}</td>
                          </tr>
                      @endforeach
                      </tbody>
                  </table>
                  {!! Form::close() !!}
                  

                  解決方案

                  I think it's because of the way you structured your HTML form. If I understood your question correctly, the following should make it work:

                  @php
                      $today = today(); 
                      $dates = []; 
                      for($i=1; $i < $today->daysInMonth + 1; ++$i) {
                          $dates[] = CarbonCarbon::createFromDate($today->year, $today->month, $i)->format('F-d-Y');
                      }
                  @endphp
                  <div class="row">
                      <div class="form-group col-md-12">
                          <small>Employee No. and Name:</small>
                          <b><i> {{ $employee->employee_no }} : {{ $employee->last_name }}, {{ $employee->first_name }}</i></b>
                          <hr>
                      </div>
                  </div>
                  <table class="table">
                      <thead>
                      <tr>
                          <th>DATE TODAY</th>
                          <th>TIME IN</th>
                          <th>TIME OUT</th>
                          <th>ACTION</th>
                      </tr>
                      </thead>
                      <tbody>
                      @foreach($dates as $date)
                          {!! Form::open(['action' => 'AdminEmployeeFilemController@insertSchedule', 'method' => 'POST']) !!}
                              <input type="hidden" name="hidEmployeeno" value="{{ $employee->employee_no }}">
                              <input type="hidden" name="hidEmployeeLast" value="{{ $employee->last_name }}">
                              <input type="hidden" name="hidEmployeeFirst" value="{{ $employee->first_name }}">
                              <tr>
                                  <td><b>{{ $date }}</b></td>
                                  <input type="hidden" name="dateToday" value="{{ $date }}">
                                  <td><input type="time" name="timeIn" class="form-control col-md-10"></td>
                                  <td><input type="time" name="timeOut" class="form-control col-md-10"></td>
                                  <td>{{ Form::button('<i class="fa fa-clock">&nbsp;&nbsp;SET TIME</i>',['type' => 'submit','class' => 'btn btn-warning btn-sm',  'style'=>"display: inline-block;"]) }}</td>
                              </tr>
                          {!! Form::close() !!}
                      @endforeach
                      </tbody>
                  </table>
                  

                  這篇關于數(shù)據(jù)僅在 Laravel 應用程序中插入最后一個數(shù)組的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯(lián)系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  MySQLi prepared statement amp; foreach loop(MySQLi準備好的語句amp;foreach 循環(huán))
                  Is mysqli_insert_id() gets record from whole server or from same user?(mysqli_insert_id() 是從整個服務器還是從同一用戶獲取記錄?)
                  PHP MySQLi doesn#39;t recognize login info(PHP MySQLi 無法識別登錄信息)
                  mysqli_select_db() expects exactly 2 parameters(mysqli_select_db() 需要 2 個參數(shù))
                  Php mysql pdo query: fill up variable with query result(Php mysql pdo 查詢:用查詢結果填充變量)
                  MySQLI 28000/1045 Access denied for user #39;root#39;@#39;localhost#39;(MySQLI 28000/1045 用戶“root@“l(fā)ocalhost的訪問被拒絕)

                  <tfoot id='AH61d'></tfoot>
                • <small id='AH61d'></small><noframes id='AH61d'>

                    • <bdo id='AH61d'></bdo><ul id='AH61d'></ul>
                    <legend id='AH61d'><style id='AH61d'><dir id='AH61d'><q id='AH61d'></q></dir></style></legend>
                  1. <i id='AH61d'><tr id='AH61d'><dt id='AH61d'><q id='AH61d'><span id='AH61d'><b id='AH61d'><form id='AH61d'><ins id='AH61d'></ins><ul id='AH61d'></ul><sub id='AH61d'></sub></form><legend id='AH61d'></legend><bdo id='AH61d'><pre id='AH61d'><center id='AH61d'></center></pre></bdo></b><th id='AH61d'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='AH61d'><tfoot id='AH61d'></tfoot><dl id='AH61d'><fieldset id='AH61d'></fieldset></dl></div>

                    1. 主站蜘蛛池模板: 欧美精品在线免费观看 | 每日更新av | 99reav| 午夜视频在线观看网址 | 看av电影| 99re热精品视频 | 精品久久久久久 | 中文字幕精品一区 | 久久精品一级 | 日日操夜夜操视频 | 欧美一区二区 | 国产传媒在线观看 | 激情av | 浮生影院免费观看中文版 | 国产免费a视频 | www国产亚洲精品久久网站 | 狠狠综合久久av一区二区小说 | 欧美毛片免费观看 | 免费观看av网站 | 超碰人人人人 | 亚洲精品欧美一区二区三区 | 玖玖视频免费 | 国产视频1区2区 | 成人一区二区在线 | 国产精品1区2区 | 91在线看视频 | 国产精品国产成人国产三级 | 国产亚洲成av人片在线观看桃 | 欧美午夜精品久久久久免费视 | 久久国产一区二区三区 | 日日骚网 | 日韩一区二区黄色片 | 91免费观看| 日韩在线成人 | 九九热精品在线 | 精品一区二区三 | 亚洲一区二区免费电影 | 久久爱黑人激情av摘花 | 欧美亚洲成人网 | 欧美成人激情视频 | 日韩免费av网站 |