Skip to content

Commit

Permalink
Merge pull request laravel#26 from nainoon/patch-1
Browse files Browse the repository at this point in the history
Update Application.php
  • Loading branch information
taylorotwell committed Apr 15, 2015
2 parents 4f959be + 0eb824a commit f427766
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -935,12 +935,8 @@ protected function mergeGroupAttributes(array $action)
*/
protected function mergeNamespaceGroup(array $action)
{
if (isset($this->groupAttributes['middleware'])) {
if (isset($action['middleware'])) {
$action['middleware'] .= '|'.$this->groupAttributes['middleware'];
} else {
$action['middleware'] = $this->groupAttributes['middleware'];
}
if (isset($this->groupAttributes['namespace']) && isset($action['uses'])) {
$action['uses'] = $this->groupAttributes['namespace'].'\\'.$action['uses'];
}

return $action;
Expand All @@ -954,8 +950,12 @@ protected function mergeNamespaceGroup(array $action)
*/
protected function mergeMiddlewareGroup($action)
{
if (isset($this->groupAttributes['namespace']) && isset($action['uses'])) {
$action['uses'] = $this->groupAttributes['namespace'].'\\'.$action['uses'];
if (isset($this->groupAttributes['middleware'])) {
if (isset($action['middleware'])) {
$action['middleware'] .= '|'.$this->groupAttributes['middleware'];
} else {
$action['middleware'] = $this->groupAttributes['middleware'];
}
}

return $action;
Expand Down

0 comments on commit f427766

Please sign in to comment.