public function nullableMorphs($name, $indexName = null)
    {
        $this->unsignedInteger("{$name}_id")->nullable();

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

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

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

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

@param  string      $name
@param  string|null $indexName

@return void
Add nullable columns for a polymorphic table .