|
@@ -35,7 +35,7 @@ |
|
|
block discarded – undo |
|
35
|
35
|
// foreign key name by using the name of the relationship function, which |
|
36
|
36
|
// when combined with an "_id" should conventionally match the columns. |
|
37
|
37
|
if (is_null($foreignKey)) { |
|
38
|
|
- $foreignKey = is_array($instance->getKeyName()) ? array_map(function ($key) use ($relation) { |
|
|
38
|
+ $foreignKey = is_array($instance->getKeyName()) ? array_map(function($key) use ($relation) { |
|
39
|
39
|
return Str::snake($relation).'_'.$key; |
|
40
|
40
|
}, $instance->getKeyName()) : Str::snake($relation).'_'.$instance->getKeyName(); |
|
41
|
41
|
} |
Please login to merge, or discard this patch.