質問編集履歴
3
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -272,12 +272,72 @@
|
|
272
272
|
|
273
273
|
### 補足情報
|
274
274
|
|
275
|
-
php 7.1.23
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
laravel 5.8.19
|
275
|
+
php 7.1.23 ,laravel 5.8.19
|
280
276
|
|
281
277
|
|
282
278
|
|
283
279
|
質問の意図がわからないや、もう少し詳しい情報が欲しいなどありましたら遠慮なくおっしゃってくれると助かります。
|
280
|
+
|
281
|
+
###解決しました
|
282
|
+
|
283
|
+
初学者なため綺麗とは言えないかもしれませんが...
|
284
|
+
|
285
|
+
```php
|
286
|
+
|
287
|
+
public function store(Request $request){
|
288
|
+
|
289
|
+
|
290
|
+
|
291
|
+
foreach($request->input(
|
292
|
+
|
293
|
+
'opening_time','ending_time',
|
294
|
+
|
295
|
+
'break_time','total_time','over_time',
|
296
|
+
|
297
|
+
'night_time','holiday_time','holiday_night',
|
298
|
+
|
299
|
+
'holiday','adsence','late','leave_early',
|
300
|
+
|
301
|
+
'holiday_work','makeup_holiday') as $key => $value){
|
302
|
+
|
303
|
+
|
304
|
+
|
305
|
+
Management::create([
|
306
|
+
|
307
|
+
|
308
|
+
|
309
|
+
'opening_time' => $request->input('opening_time')[$key],
|
310
|
+
|
311
|
+
'ending_time' => $request->input('ending_time')[$key],
|
312
|
+
|
313
|
+
'break_time' => $request->input('break_time')[$key],
|
314
|
+
|
315
|
+
'total_time' => $request->input('total_time')[$key],
|
316
|
+
|
317
|
+
'over_time' => $request->input('over_time')[$key],
|
318
|
+
|
319
|
+
'night_time' => $request->input('night_time')[$key],
|
320
|
+
|
321
|
+
'holiday_time' => $request->input('holiday_time')[$key],
|
322
|
+
|
323
|
+
'holiday_night' => $request->input('holiday_night')[$key],
|
324
|
+
|
325
|
+
'holiday' => $request->input('holiday')[$key],
|
326
|
+
|
327
|
+
'adsence' => $request->input('adsence')[$key],
|
328
|
+
|
329
|
+
'late' => $request->input('late')[$key],
|
330
|
+
|
331
|
+
'leave_early' => $request->input('leave_early')[$key],
|
332
|
+
|
333
|
+
'holiday_work' => $request->input('holiday_work')[$key],
|
334
|
+
|
335
|
+
'makeup_holiday' => $request->input('makeup_holiday')[$key]]);}
|
336
|
+
|
337
|
+
|
338
|
+
|
339
|
+
return redirect('/');
|
340
|
+
|
341
|
+
}
|
342
|
+
|
343
|
+
```
|
2
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
### 前提・実現したいこと
|
2
2
|
|
3
|
-
初めてterat
|
3
|
+
初めてteratailを利用させてもらいます。プログラミング初心者です。
|
4
4
|
|
5
5
|
現場に入るまでの期間で作成をお願いされていますが、ほぼ未経験であり
|
6
6
|
|
1
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -2,6 +2,10 @@
|
|
2
2
|
|
3
3
|
初めてterateilを利用させてもらいます。プログラミング初心者です。
|
4
4
|
|
5
|
+
現場に入るまでの期間で作成をお願いされていますが、ほぼ未経験であり
|
6
|
+
|
7
|
+
周りに現在エンジニアがおらず質問できる場がないため利用させていただきます。
|
8
|
+
|
5
9
|
|
6
10
|
|
7
11
|
現在laravelで社内勤怠システムの作成をしています。
|
@@ -16,6 +20,8 @@
|
|
16
20
|
|
17
21
|
|
18
22
|
|
23
|
+
|
24
|
+
|
19
25
|
### 発生している問題・エラーメッセージ
|
20
26
|
|
21
27
|
|