Skip to content

Commit ad37382

Browse files
committed
Add méthod commandsNamed in Blueprint
1 parent bc1ab13 commit ad37382

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/Schema/Blueprint.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,19 @@ protected function addReplyListEntryCommands(Connection $connection)
6969
}
7070
}
7171

72+
/**
73+
* Get all of the commands matching the given names.
74+
*
75+
* @param array $names
76+
* @return \Illuminate\Support\Collection
77+
*/
78+
protected function commandsNamed(array $names)
79+
{
80+
return collect($this->commands)->filter(function ($command) use ($names) {
81+
return in_array($command->name, $names);
82+
});
83+
}
84+
7285
/**
7386
* Specify a system name for the table.
7487
*

0 commit comments

Comments
 (0)