質問編集履歴
4
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -204,6 +204,68 @@
|
|
204
204
|
|
205
205
|
```
|
206
206
|
|
207
|
+
### 該当のソースコード
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
```php
|
212
|
+
|
213
|
+
<?php
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
namespace App;
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
use Illuminate\Database\Eloquent\Model;
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
class Management extends Model
|
226
|
+
|
227
|
+
{
|
228
|
+
|
229
|
+
protected $fillable = [
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
'opening_time','ending_time','break_time',
|
234
|
+
|
235
|
+
'holiday_time','holiday_night','holiday',
|
236
|
+
|
237
|
+
'adsence','late','leave_early','holiday_work',
|
238
|
+
|
239
|
+
'makeup_holiday','project','memo','user_id',
|
240
|
+
|
241
|
+
'month_id','calendar_id','created_at','updated_at','year'];
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
public function user(){
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
return $this->belongsTo(User::class);
|
252
|
+
|
253
|
+
}
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
public function month(){
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
return $this->belongsTo(Month::class);
|
262
|
+
|
263
|
+
}
|
264
|
+
|
265
|
+
}
|
266
|
+
|
267
|
+
```
|
268
|
+
|
207
269
|
### 試したこと
|
208
270
|
|
209
271
|
dd()でデバッグして$requestには期待した値が入っていることを確認しています。
|
3
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -74,15 +74,15 @@
|
|
74
74
|
|
75
75
|
<td>{{$edit->calendar_id}}</td>
|
76
76
|
|
77
|
-
<td><input class="form-control" type="time" step="900" name="opening_time[]" value="{{$edit->opening_time}}"></td>
|
77
|
+
<td><input class="form-control" type="time" step="900" name="opening_time[{{$edit->id}}]" value="{{$edit->opening_time}}"></td>
|
78
|
-
|
78
|
+
|
79
|
-
<td><input class="form-control" type="time" step="900" name="ending_time[]" value="{{$edit->ending_time}}"></td>
|
79
|
+
<td><input class="form-control" type="time" step="900" name="ending_time[{{$edit->id}}]" value="{{$edit->ending_time}}"></td>
|
80
|
-
|
80
|
+
|
81
|
-
<td><input class="form-control" type="time" step="900" name="break_time[]" value="{{$edit->break_time}}"></td>
|
81
|
+
<td><input class="form-control" type="time" step="900" name="break_time[{{$edit->id}}]" value="{{$edit->break_time}}"></td>
|
82
|
-
|
82
|
+
|
83
|
-
<td><input class="form-control" type="time" step="900" name="holiday_time[]" value="{{$edit->holiday_time}}"></td>
|
83
|
+
<td><input class="form-control" type="time" step="900" name="holiday_time[{{$edit->id}}]" value="{{$edit->holiday_time}}"></td>
|
84
|
-
|
84
|
+
|
85
|
-
<td><input class="form-control" type="time" step="900" name="holiday_night[]" value="{{$edit->holiday_night}}"></td>
|
85
|
+
<td><input class="form-control" type="time" step="900" name="holiday_night[{{$edit->id}}]" value="{{$edit->holiday_night}}"></td>
|
86
86
|
|
87
87
|
<td>
|
88
88
|
|
2
修正
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
laravelでupdateをして更新すると値がNULLになる
|
1
|
+
laravelでupdate()をして更新すると値がNULLになる
|
test
CHANGED
File without changes
|
1
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -221,3 +221,5 @@
|
|
221
221
|
初学者なため質問の意図や情報が足りない場合がありますので
|
222
222
|
|
223
223
|
遠慮なく仰っていただけると嬉しいです。
|
224
|
+
|
225
|
+
申し訳ありませんがご教示願います...
|