Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bd0d8a5

Browse files
committed
Merge pull request laravel#5504 from jildertmiedema/patch-1
Set index name of morph relation
2 parents 8f49a87 + 069c916 commit bd0d8a5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Illuminate/Database/Schema/Blueprint.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -663,13 +663,13 @@ public function binary($column)
663663
* @param string $name
664664
* @return void
665665
*/
666-
public function morphs($name)
666+
public function morphs($name, $indexName = null)
667667
{
668668
$this->unsignedInteger("{$name}_id");
669669

670670
$this->string("{$name}_type");
671671

672-
$this->index(array("{$name}_id", "{$name}_type"));
672+
$this->index(array("{$name}_id", "{$name}_type"), $indexName);
673673
}
674674

675675
/**

0 commit comments

Comments
 (0)