简体   繁体   中英

Laravel: how to delete the row in different table in the same id…?

PageUsers::where('pageUser_id', Auth::user()->user_id)
->where('page_user_level', 0)
->join('page','page.page_id','=','page_users.page_Id')
->delete();

how to delete row in different table with the same id laravel?

why don't you get the user id first and delete each rows separately.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM