Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Oct 27, 2020
1 parent 13326f5 commit 043768d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Illuminate/Routing/RouteRegistrar.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use BadMethodCallException;
use Closure;
use Illuminate\Support\Arr;
use Illuminate\Support\Reflector;
use InvalidArgumentException;

/**
Expand Down Expand Up @@ -167,6 +168,15 @@ protected function compileAction($action)
$action = ['uses' => $action];
}

if (is_array($action) &&
! Arr::isAssoc($action) &&
Reflector::isCallable($action)) {
$action = [
'uses' => $action[0].'@'.$action[1],
'controller' => $action[0].'@'.$action[1],
];
}

return array_merge($this->attributes, $action);
}

Expand Down

0 comments on commit 043768d

Please sign in to comment.