Skip to content

Commit

Permalink
fix conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Dec 20, 2016
2 parents cf42140 + d744b01 commit 7aaa53c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
16 changes: 16 additions & 0 deletions src/Illuminate/Database/Schema/Blueprint.php
Original file line number Diff line number Diff line change
Expand Up @@ -901,6 +901,22 @@ public function morphs($name, $indexName = null)
$this->index(["{$name}_id", "{$name}_type"], $indexName);
}

/**
* Add nullable columns for a polymorphic table.
*
* @param string $name
* @param string|null $indexName
* @return void
*/
public function nullableMorphs($name, $indexName = null)
{
$this->unsignedInteger("{$name}_id")->nullable();

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

$this->index(["{$name}_id", "{$name}_type"], $indexName);
}

/**
* Adds the `remember_token` column to the table.
*
Expand Down
8 changes: 7 additions & 1 deletion src/Illuminate/Events/Dispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,13 @@ protected function addInterfaceListeners($eventName, array $listeners = [])
{
foreach (class_implements($eventName) as $interface) {
if (isset($this->listeners[$interface])) {
$listeners = array_merge_recursive($listeners, $this->listeners[$interface]);
foreach ($this->listeners[$interface] as $priority => $names) {
if (isset($listeners[$priority])) {
$listeners[$priority] = array_merge($listeners[$priority], $names);
} else {
$listeners[$priority] = $names;
}
}
}
}

Expand Down

0 comments on commit 7aaa53c

Please sign in to comment.