How to update many-to-many relationship

Submitted by nihaoit - 5 years ago

How to update many-to-many relationship

$result=DB::table('user_course')->whereNull('expires')->update(['expires'=>'2014-06-14 00:00:00']);