Skip to content

Commit

Permalink
Minor
Browse files Browse the repository at this point in the history
  • Loading branch information
daftspunk committed May 14, 2024
1 parent 2cc360d commit c3d4ba6
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/Database/Relations/BelongsToMany.php
Original file line number Diff line number Diff line change
Expand Up @@ -301,14 +301,10 @@ public function simplePaginate($perPage = null, $columns = ['*'], $pageName = 'p
*/
public function newPivot(array $attributes = [], $exists = false)
{
/*
* October looks to the relationship parent
*/
// October looks to the relationship parent
$pivot = $this->parent->newRelationPivot($this->relationName, $this->parent, $attributes, $this->table, $exists);

/*
* Laravel looks to the related model
*/
// Laravel looks to the related model
if (empty($pivot)) {
$pivot = $this->related->newPivot($this->parent, $attributes, $this->table, $exists, $this->using);
}
Expand Down

0 comments on commit c3d4ba6

Please sign in to comment.