I read the doc in https://laravel.com/docs/7.x/queries which has this line
foreach ($users as $user) {
echo $user->name;
}
$users is an object of the Illuminate\Support\Collection class which has $items as its field. So how can they loop through $users which has only one field ( $items ) and stil get all the data of the table?