Answers for "i want to delete multiple records in laravel"

0

How to Delete Multiple Records using Checkbox in Laravel

public function deleteAll(Request $request)
{
  $ids = $request->ids;
  DB::table("products")->whereIn('id',explode(",",$ids))->delete();
  return response()->json(['success'=>"Products Deleted successfully."]);
}
//@sujay
Posted by: Guest on February-02-2021
-1

laravel delete multiple rows

$org->products()->whereIn('id', $ids)->delete()
Posted by: Guest on February-26-2021

Code answers related to "i want to delete multiple records in laravel"

Browse Popular Code Answers by Language