We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d3bcded commit bc1fd4cCopy full SHA for bc1fd4c
src/Laravel/Eloquent/Metadata/ModelMetadata.php
@@ -77,7 +77,7 @@ public function getAttributes(Model $model): array
77
$indexes = $schema->getIndexes($table);
78
$relations = $this->getRelations($model);
79
80
- $foreignKeys = array_flip(array_column($relations, 'foreign_key'));
+ $foreignKeys = array_flip(array_filter(array_column($relations, 'foreign_key')));
81
$attributes = [];
82
83
foreach ($columns as $column) {
0 commit comments