src/relationships/ManyHaveManyRelationship.php 1 location
|
@@ 80-83 (lines=4) @@
|
| 77 |
|
Text::singularize($this->setupTable) . '_id'; |
| 78 |
|
} |
| 79 |
|
|
| 80 |
|
if(!isset($this->options['junction_foreign_key'])) { |
| 81 |
|
$this->options['junction_foreign_key'] = |
| 82 |
|
Text::singularize($foreignModel->getTable()) . '_id'; |
| 83 |
|
} |
| 84 |
|
} |
| 85 |
|
} |
| 86 |
|
|
src/relationships/BelongsToRelationship.php 1 location
|
@@ 52-54 (lines=3) @@
|
| 49 |
|
if($this->options['foreign_key'] == null) { |
| 50 |
|
$this->options['foreign_key'] = $model->getDescription()->getPrimaryKey()[0]; |
| 51 |
|
} |
| 52 |
|
if($this->options['local_key'] == null) { |
| 53 |
|
$this->options['local_key'] = Text::singularize($model->getTable()) . '_id'; |
| 54 |
|
} |
| 55 |
|
} |
| 56 |
|
} |
| 57 |
|
|