Skip to content

Commit

Permalink
Improve the App\Controllers\BaseController
Browse files Browse the repository at this point in the history
  • Loading branch information
LuckyCyborg committed Mar 29, 2019
1 parent 361f15a commit a0b9cae
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/Controllers/BaseController.php
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,8 @@ protected function resolveViewPath()
if (preg_match('#^(.+)/Controllers/(.*)$#', $path, $matches) === 1) {
list (, $basePath, $viewPath) = $matches;

if ($basePath != 'App') {
// A Controller within a Package namespace.
return $this->viewPath = sprintf('%s::%s', $basePath, $viewPath);
if ($basePath !== 'App') {
$viewPath = sprintf('%s::%s', $basePath, $viewPath);
}

return $this->viewPath = $viewPath;
Expand Down

0 comments on commit a0b9cae

Please sign in to comment.