diff --git a/src/Schema/Blueprint.php b/src/Schema/Blueprint.php index 6aedfea..7371dbc 100644 --- a/src/Schema/Blueprint.php +++ b/src/Schema/Blueprint.php @@ -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. *