diff --git a/src/Models/Model.php b/src/Models/Model.php index 36936289..3a4a86f8 100644 --- a/src/Models/Model.php +++ b/src/Models/Model.php @@ -155,7 +155,7 @@ public function addRelationship(string $type, string $reference) public function addPivotTable(string $reference) { - $segments = [$this->name(), $reference]; + $segments = [$this->name(), basename($reference)]; sort($segments); $this->pivotTables[] = $segments; } @@ -164,7 +164,7 @@ public function indexes(): array { return $this->indexes; } - + public function addIndex(Index $index) { $this->indexes[] = $index;