📜  laravel 循环遍历集合 - PHP 代码示例

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

代码示例1
$users = App\User::where('active', 1)->get();

foreach ($users as $user) {
    echo $user->name;
}