remove column in addiction test
This commit is contained in:
parent
3b8990d6a3
commit
49caec88af
|
@ -37,9 +37,7 @@ public function history()
|
|||
|
||||
public function addiction()
|
||||
{
|
||||
$items = Item::with('factor')
|
||||
->get()
|
||||
->groupBy('factor.name');
|
||||
$items = Item::where('status', 'active')->get();
|
||||
|
||||
$likerts = Likert::orderBy('score')->get();
|
||||
return view('user.addiction', compact('items', 'likerts'));
|
||||
|
|
|
@ -20,20 +20,13 @@
|
|||
<table class="table table-bordered w-100 text-wrap align-middle">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Factor</th>
|
||||
<th class="text-center">Item</th>
|
||||
<th>Item Content</th>
|
||||
<th class="text-center">Select Answer</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($items as $factorName => $groupedItems)
|
||||
@foreach ($groupedItems as $item)
|
||||
@foreach ($items as $item)
|
||||
<tr>
|
||||
@if ($loop->first)
|
||||
<td rowspan="{{ $groupedItems->count() }}">{{ $factorName }}</td>
|
||||
@endif
|
||||
<td class="text-center">{{ $item->code }}</td>
|
||||
<td class="text-wrap">{{ $item->content }}</td>
|
||||
<td class="text-center">
|
||||
<input type="hidden" name="values[]" value="{{ $item->value }}">
|
||||
|
@ -48,7 +41,6 @@
|
|||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
|
|
Loading…
Reference in New Issue