how delete multiple row from relation in laravel
AppPost;
$post = Post::find($id);
Comment::where('post_id',$post)->delete();
how delete multiple row from relation in laravel
AppPost;
$post = Post::find($id);
Comment::where('post_id',$post)->delete();
delete multiple row by model in laravel
public function destroy($id)
{
if (is_array($id))
{
Product::destroy($id);
}
else
{
Product::findOrFail($id)->delete();
}
// redirect or whatever...
}
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