Skip to content

Commit

Permalink
Improve the Views service
Browse files Browse the repository at this point in the history
  • Loading branch information
LuckyCyborg committed Apr 30, 2018
1 parent 5815f9d commit c001e12
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Foundation/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class Application extends Container implements ResponsePreparerInterface
*
* @var string
*/
const VERSION = '4.0.47';
const VERSION = '4.0.48';

/**
* Indicates if the application has "booted".
Expand Down
6 changes: 3 additions & 3 deletions src/View/FileViewFinder.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ protected function findNamedPathView($name)

$paths = $this->hints[$namespace];

if (Str::endsWith($path = head($this->paths), DS .'Override')) {
if (Str::endsWith($path = head($this->paths), DS .'Overrides')) {
$path = $path .DS .'Packages' .DS .$namespace;

if (! in_array($path, $paths) && $this->files->isDirectory($path)) {
Expand Down Expand Up @@ -277,12 +277,12 @@ public function overridesFrom($namespace)
// The folder of Views Override should be located in the same directory with the Views one.
// For example: <BASEPATH>/themes/Bootstrap/Views -> <BASEPATH>/themes/Bootstrap/Override

$path = dirname(head($paths)) .DS .'Override';
$path = dirname(head($paths)) .DS .'Overrides';

if (! in_array($path, $this->paths) && $this->files->isDirectory($path)) {
// If there was previously added another Views overriding path, we will remove it.

if (Str::endsWith(head($this->paths), DS .'Override')) {
if (Str::endsWith(head($this->paths), DS .'Overrides')) {
array_shift($this->paths);
}

Expand Down

0 comments on commit c001e12

Please sign in to comment.