delete multiple row in laravel
DB::table('users')->delete();
DB::table('users')->where('votes', '>', 100)->delete();
delete multiple row in laravel
DB::table('users')->delete();
DB::table('users')->where('votes', '>', 100)->delete();
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
laravel delete multiple rows
$org->products()->whereIn('id', $ids)->delete()
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us