how to write foreach loop in laravek code example Example: foreach in laravel foreach ($users as $user) { // stuff here }