Posts by Magus • 156 points
1 post
-
4
votes2
answers1415
viewsA: Laravel - Update all fields from a large table
Hello, the code you will make is very simple. $users = User::wherePassword(null)->take(5000); foreach($users as $user){ $user->password = Hash::make($user->cli_senha); $user->save(); }…