Skip to content

Commit cfe3359

Browse files
ajayinfyommitulgolakiya
authored andcommitted
fix(relationships): minor fix to generate mtm relationship (#784)
1 parent 6fcc8e3 commit cfe3359

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Utils/TableFieldsGenerator.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,10 @@ private function isManyToMany($tables, $tableName, $modelTable, $modelTableName)
456456
}
457457
}
458458

459+
if (empty($manyToManyTable)) {
460+
return false;
461+
}
462+
459463
$modelName = model_name_from_table_name($manyToManyTable);
460464

461465
return GeneratorFieldRelation::parseRelation('mtm,'.$modelName.','.$tableName);

0 commit comments

Comments
 (0)