回答編集履歴

1

追記

2020/09/02 10:00

投稿

phper.k
phper.k

スコア3923

test CHANGED
@@ -77,3 +77,53 @@
77
77
  }
78
78
 
79
79
  ```
80
+
81
+
82
+
83
+ ```php
84
+
85
+
86
+
87
+ <table class="table table-condensed table-striped">
88
+
89
+ <th>部署名</th>
90
+
91
+ <th>所属スタッフ</th>
92
+
93
+ <tbody id="sort_items">
94
+
95
+ @foreach ($depts as $dept)
96
+
97
+ <tr id="item_{{ $dept->id }}" class="sort_item">
98
+
99
+ <td>{{ $dept->name }}</td>
100
+
101
+ <td>
102
+
103
+ // ここに東西で分けてスタッフを表示したい
104
+
105
+ @foreach($dept->staffs as $staff)
106
+
107
+ @if(.....)
108
+
109
+ ...
110
+
111
+ @else
112
+
113
+ ...
114
+
115
+ @endif
116
+
117
+ @endforeach
118
+
119
+ </td>
120
+
121
+ </tr>
122
+
123
+ @endforeach
124
+
125
+ </tbody>
126
+
127
+ </table>
128
+
129
+ ```