Skip to content

Commit

Permalink
Add méthod commandsNamed in Blueprint
Browse files Browse the repository at this point in the history
  • Loading branch information
cooperl22 committed Oct 30, 2019
1 parent bc1ab13 commit ad37382
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/Schema/Blueprint.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,19 @@ protected function addReplyListEntryCommands(Connection $connection)
}
}

/**
* Get all of the commands matching the given names.
*
* @param array $names
* @return \Illuminate\Support\Collection
*/
protected function commandsNamed(array $names)
{
return collect($this->commands)->filter(function ($command) use ($names) {
return in_array($command->name, $names);
});
}

/**
* Specify a system name for the table.
*
Expand Down

0 comments on commit ad37382

Please sign in to comment.