laravel loop through collection
snippet in php

laravel loop through collection

user256

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

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