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