Skip to content

Commit f80ba11

Browse files
committed
support array syntax
1 parent c87794f commit f80ba11

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Illuminate/Routing/Route.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -857,6 +857,10 @@ public function named(...$patterns)
857857
*/
858858
public function uses($action)
859859
{
860+
if (is_array($action)) {
861+
$action = $action[0].'@'.$action[1];
862+
}
863+
860864
$action = is_string($action) ? $this->addGroupNamespaceToStringUses($action) : $action;
861865

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

0 commit comments

Comments
 (0)