Reputation: 65
Laravel how to update multiple id valus in table
print_r($test); exit();
Array ( [0] => 185 [1] => 216 )
$report = Test::find($test);
$report->status = "A";
$report->save();
Upvotes: 0
Views: 6394
Reputation: 545
Test::whereIn('id', $test)->update(['status' => "A"]);
Good luck
Upvotes: 4