Level 75
@if ($student->rounds->isEmpty())
// button
@endif
1 like
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hello, I'm trying to add filter. I'm having students table and rounds table if student is added to rounds button appear but if student is not added to rounds button must be displayed
@if($student->rounds)
<th class="col-md-2 border-right"><span class="result btn btn-sm btn-primary col-md-1 edit-input"><span class="glyphicon glyphicon-edit"></span> </span></th>
@else
@endif
how can i do it with @if ?
@if ($student->rounds->isEmpty())
// button
@endif
Please or to participate in this conversation.