Skip to content

Commit

Permalink
support array syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Sep 9, 2020
1 parent c87794f commit f80ba11
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Illuminate/Routing/Route.php
Original file line number Diff line number Diff line change
Expand Up @@ -857,6 +857,10 @@ public function named(...$patterns)
*/
public function uses($action)
{
if (is_array($action)) {
$action = $action[0].'@'.$action[1];
}

$action = is_string($action) ? $this->addGroupNamespaceToStringUses($action) : $action;

return $this->setAction(array_merge($this->action, $this->parseAction([
Expand Down

0 comments on commit f80ba11

Please sign in to comment.