src/relationships/HasManyRelationship.php 1 location
|
@@ 60-62 (lines=3) @@
|
| 57 |
|
if($this->options['foreign_key'] == null) { |
| 58 |
|
$this->options['foreign_key'] = Text::singularize($this->setupTable) . '_id'; |
| 59 |
|
} |
| 60 |
|
if($this->options['local_key'] == null) { |
| 61 |
|
$this->options['local_key'] = $this->setupPrimaryKey[0]; |
| 62 |
|
} |
| 63 |
|
} |
| 64 |
|
|
| 65 |
|
public function assignModel($model, $relationship) { |
src/relationships/ManyHaveManyRelationship.php 1 location
|
@@ 84-86 (lines=3) @@
|
| 81 |
|
$foreignModel->getDescription()->getPrimaryKey()[0]; |
| 82 |
|
} |
| 83 |
|
|
| 84 |
|
if ($this->options['local_key'] == null) { |
| 85 |
|
$this->options['local_key'] = $this->setupPrimaryKey[0]; |
| 86 |
|
} |
| 87 |
|
|
| 88 |
|
if (!isset($this->options['junction_local_key'])) { |
| 89 |
|
$this->options['junction_local_key'] = |