예제 #1
0
                    <tr>
                        <th>Start</th>
                        <th>End</th>
                        <th>Real Start</th>
                        <th>Real End</th>
                        <th>Address</th>
                        <th>Amount</th>
                        <th></th>
                    </tr>
                    </thead>
                    <tbody>
                    @if(count($data) > 0)
                        @foreach($data as $row)
                            <?php 
$date_start = old("real_start." . $row['id']) ?? \App\Common::formatDateTimeFromSQLSingle($row['real_start']) ?? \App\Common::formatDateTimeFromSQLSingle($row['start']) ?? null;
$date_end = old("real_end." . $row['id']) ?? \App\Common::formatDateTimeFromSQLSingle($row['real_end']) ?? \App\Common::formatDateTimeFromSQLSingle($row['end']) ?? null;
?>
                            <tr>
                                <td>{{$row['start']}}</td>
                                <td>{{$row['end']}}</td>
                                <td class="@if($errors->first("real_start.".$row['id'])) has-error @endif">
                                    <input type="text" name="real_start[{{$row['id']}}]"
                                           class="form-control time-picker"
                                           onfocus='$(this).data("daterangepicker").setStartDate("{{$date_start}}"); $(this).data("daterangepicker").setEndDate("{{$date_start}}"); '
                                           value="{{old("real_start.".$row['id']) ?? \App\Common::formatDateTimeFromSQLSingle($row['real_start']) ?? "No"}}"
                                    />
                                </td>
                                <td class="@if($errors->first("real_end.".$row['id'])) has-error @endif">
                                    <input type="text" name="real_end[{{$row['id']}}]"
                                           class="form-control time-picker"
                                           onfocus='$(this).data("daterangepicker").setStartDate("{{$date_end}}"); $(this).data("daterangepicker").setEndDate("{{$date_end}}"); '