pivot multiple relations laravel code example
Example: laravel many to many update all pivot
$user->customviews()
->newPivotStatement()
->where('user_id', '=', $user->id)
->update(array('default' => 0));
$user->customviews()
->newPivotStatement()
->where('user_id', '=', $user->id)
->update(array('default' => 0));