質問編集履歴

1

ソースコードの追加

2020/08/31 09:43

投稿

yuki93850
yuki93850

スコア0

test CHANGED
File without changes
test CHANGED
@@ -24,6 +24,102 @@
24
24
 
25
25
 
26
26
 
27
+ ###ソースコード
28
+
29
+ @extends('layouts.holiday')
30
+
31
+ @section('title', '休日設定')
32
+
33
+ @section('content')
34
+
35
+ <h1>休日設定</h1>
36
+
37
+ <!-- 休日入力フォーム -->
38
+
39
+ <form method="POST" action="/holiday">
40
+
41
+ <div class="form-group">
42
+
43
+ {{csrf_field()}}
44
+
45
+ <label for="day">日付[YYYY/MM/DD] </label>
46
+
47
+ <input type="text" name="day" class="form-control" id="day" value="{{$data->day}}">
48
+
49
+ <label for="description">説明</label>
50
+
51
+ <input type="text" name="description" class="form-control" id="description" value="{{$data->description}}">
52
+
53
+ </div>
54
+
55
+ <button type="submit" class="btn btn-primary">登録</button>
56
+
57
+ <input type="hidden" name="id" value="{{$data->id}}">
58
+
59
+ </form>
60
+
61
+ <!-- 日付のリンクをつける -->
62
+
63
+ <th scope="row"><a href="{{ url('/holiday/'.$val->id) }}">{{$val->day}}</a></th>
64
+
65
+ <!-- 休日一覧表示 -->
66
+
67
+ <script>
68
+
69
+ $( function() {
70
+
71
+ $( "#day" ).datepicker({dateFormat: 'yy-mm-dd'});
72
+
73
+ } );
74
+
75
+ </script>
76
+
77
+ <table class="table">
78
+
79
+ <thead>
80
+
81
+ <tr>
82
+
83
+ <th scope="col">日付</th>
84
+
85
+ <th scope="col">説明</th>
86
+
87
+ <th scope="col">作成日</th>
88
+
89
+ <th scope="col">更新日</th>
90
+
91
+ </tr>
92
+
93
+ </thead>
94
+
95
+ <tbody>
96
+
97
+ @foreach($list as $val)
98
+
99
+ <tr>
100
+
101
+ <th scope="row">{{$val->day}}</th>
102
+
103
+ <td>{{$val->description}}</td>
104
+
105
+ <td>{{$val->created_at}}</td>
106
+
107
+ <td>{{$val->updated_at}}</td>
108
+
109
+ </tr>
110
+
111
+ @endforeach
112
+
113
+ </tbody>
114
+
115
+ </table>
116
+
117
+ @endsection
118
+
119
+
120
+
121
+
122
+
27
123
  ### github account
28
124
 
29
125
  https://github.com/yuki3186/mynews.1