I want update an array of ids.
Eloquent Query
$my_ids = json_encode($request->post('my_ids'));
Lead::whereIn('id', $my_ids)->update(['op' => 2]);
but I need to pass a string with comma.
How can I solve it?
I want update an array of ids.
Eloquent Query
$my_ids = json_encode($request->post('my_ids'));
Lead::whereIn('id', $my_ids)->update(['op' => 2]);
but I need to pass a string with comma.
How can I solve it?