laravel many to many migration example
Example 1: laravel many to many migration
php artisan make:migration create_posts_users_table
Example 2: laravel many to many update all pivot
$user->customviews()
->newPivotStatement()
->where('user_id', '=', $user->id)
->update(array('default' => 0));