Answers for "empty foreach in laravel"

PHP
0

foreach empty laravel

@forelse($status->replies as $reply)
    <p>{{ $reply->body }}</p>
@empty
    <p>No replies</p>
@endforelse
  
Check the documentation for the best result:  
http://laravel.com/docs/5.1/blade#control-structures
Posted by: Guest on February-11-2021

Browse Popular Code Answers by Language