Answers for "what is forelse in laravel"

PHP
0

what is forelse in laravel

ForElse is a ForEach loop, but with extra handling for empty array.
  
@forelse ($users as $user)
    <li>{{ $user->name }}</li>
@empty
    <p>No users</p>
@endforelse
Posted by: Guest on August-23-2021

Browse Popular Code Answers by Language