Level 104
It will return a number of records deleted.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
How would I check this query was successfully executed:
DB::table('private_messages')->whereIn('id', $remove_ids[0])->delete();
It depends...
You could do something like the following, or assign the result to a variable;
if (DB::table('private_messages')->whereIn('id', $remove_ids[0])->delete()) {
// more than 0 records were deleted
}
Please or to participate in this conversation.