public function morphs($name, $indexName = null)
    {
        $this->string("{$name}_type");

        $this->unsignedBigInteger("{$name}_id");

        $this->index(["{$name}_type", "{$name}_id"], $indexName);
    }
public function morphs($name, $indexName = null)
    {
        $this->string("{$name}_type");

        $this->unsignedBigInteger("{$name}_id");

        $this->index(["{$name}_type", "{$name}_id"], $indexName);
    }
public function morphs ( $ name , $ indexName = null ) { $ this -> string ( "{$name}_type" ) ; $ this -> unsignedBigInteger ( "{$name}_id" ) ; $ this -> index ( [ "{$name}_type" , "{$name}_id" ] , $ indexName ) ; }
Add the proper columns for a polymorphic table.

@param  string  $name
@param  string|null  $indexName
@return void
Add the proper columns for a polymorphic table .