laravel loop through collection latest 3 code example
Example: laravel loop through collection
$users = App\User::where('active', 1)->get();
foreach ($users as $user) {
echo $user->name;
}
$users = App\User::where('active', 1)->get();
foreach ($users as $user) {
echo $user->name;
}