I have this code, and I want to sort them by order, I have the order
column in database which always takes 1, 2, 3, 4
and I want the answers to be in that order how can I do this on laravel blade .
<div class="form-group" id="group-form-id">
<label id="correct_answer" style="color: #00a65a;">
@lang('test-results.correct_answer'):
<div style="line-height: 8px; padding-top: 5px;">
<?php $i=1; ?>
@foreach($question->answers as $answer)
@if($answer->order)
<span id="test_span">
<br>
<em style="padding-right: 10px; color: #999;">
{{ $i }}.
</em>
{!! $answer->text !!}
</span>
<hr style="width: 500%;border-top: 1px solid rgba(238, 238, 238, 0.37);">
@endif
<?php $i++; ?>
@endforeach
</div>
</l