Answers for "laravel delete two record in two different tables together"

2

delete multiple row in laravel

DB::table('users')->delete();

DB::table('users')->where('votes', '>', 100)->delete();
Posted by: Guest on July-15-2021
1

how delete multiple row from relation in laravel

AppPost;
$post = Post::find($id);
Comment::where('post_id',$post)->delete();
Posted by: Guest on April-20-2021

Code answers related to "laravel delete two record in two different tables together"

Browse Popular Code Answers by Language