質問編集履歴
1
ソースコードの追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -11,6 +11,54 @@
|
|
11
11
|
|
12
12
|
**gyazoです**→https://gyazo.com/54415c23c2fd1db15c0001efcab79614)
|
13
13
|
|
14
|
+
###ソースコード
|
15
|
+
@extends('layouts.holiday')
|
16
|
+
@section('title', '休日設定')
|
17
|
+
@section('content')
|
18
|
+
<h1>休日設定</h1>
|
19
|
+
<!-- 休日入力フォーム -->
|
20
|
+
<form method="POST" action="/holiday">
|
21
|
+
<div class="form-group">
|
22
|
+
{{csrf_field()}}
|
23
|
+
<label for="day">日付[YYYY/MM/DD] </label>
|
24
|
+
<input type="text" name="day" class="form-control" id="day" value="{{$data->day}}">
|
25
|
+
<label for="description">説明</label>
|
26
|
+
<input type="text" name="description" class="form-control" id="description" value="{{$data->description}}">
|
27
|
+
</div>
|
28
|
+
<button type="submit" class="btn btn-primary">登録</button>
|
29
|
+
<input type="hidden" name="id" value="{{$data->id}}">
|
30
|
+
</form>
|
31
|
+
<!-- 日付のリンクをつける -->
|
32
|
+
<th scope="row"><a href="{{ url('/holiday/'.$val->id) }}">{{$val->day}}</a></th>
|
33
|
+
<!-- 休日一覧表示 -->
|
34
|
+
<script>
|
35
|
+
$( function() {
|
36
|
+
$( "#day" ).datepicker({dateFormat: 'yy-mm-dd'});
|
37
|
+
} );
|
38
|
+
</script>
|
39
|
+
<table class="table">
|
40
|
+
<thead>
|
41
|
+
<tr>
|
42
|
+
<th scope="col">日付</th>
|
43
|
+
<th scope="col">説明</th>
|
44
|
+
<th scope="col">作成日</th>
|
45
|
+
<th scope="col">更新日</th>
|
46
|
+
</tr>
|
47
|
+
</thead>
|
48
|
+
<tbody>
|
49
|
+
@foreach($list as $val)
|
50
|
+
<tr>
|
51
|
+
<th scope="row">{{$val->day}}</th>
|
52
|
+
<td>{{$val->description}}</td>
|
53
|
+
<td>{{$val->created_at}}</td>
|
54
|
+
<td>{{$val->updated_at}}</td>
|
55
|
+
</tr>
|
56
|
+
@endforeach
|
57
|
+
</tbody>
|
58
|
+
</table>
|
59
|
+
@endsection
|
60
|
+
|
61
|
+
|
14
62
|
### github account
|
15
63
|
https://github.com/yuki3186/mynews.1
|
16
64
|
|