what should you remove before making a Pivot Table? code example
Example: adding soft delete in pivot table
public function groups() {
return $this->belongsToMany(Group::class)
->wherePivot('deleted_at', null)
->withTimestamps();
}
$user->groups
->updateExistingPivot($groupId, ['deleted_at' => Carbon\Carbon::now()]);