Solution:1
Check the documentation for the best result:
@forelse($status->replies as $reply)
<p>{{ $reply->body }}</p>
@empty
<p>No replies</p>
@endforelse
Solution:1
Check the documentation for the best result:
@forelse($status->replies as $reply)
<p>{{ $reply->body }}</p>
@empty
<p>No replies</p>
@endforelse
Solution:2
I think you are trying to check whether the array is empty or not.You can do like this :
@if(!$result->isEmpty())
// $result is not empty
@else
// $result is empty
@endif
Reference isEmpty()