📜  laravel 中的 forelse 是什么 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:05.997000             🧑  作者: Mango

代码示例1
ForElse is a ForEach loop, but with extra handling for empty array.
  
@forelse ($users as $user)
    
  • {{ $user->name }}
  • @empty

    No users

    @endforelse