Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/Illuminate/Foundation/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ public function path($path = '')
{
$appPath = $this->appPath ?: $this->basePath.DIRECTORY_SEPARATOR.'app';

return $appPath.($path ? DIRECTORY_SEPARATOR.$path : $path);
return $appPath.($path != '' ? DIRECTORY_SEPARATOR.$path : '');
}

/**
Expand All @@ -365,7 +365,7 @@ public function useAppPath($path)
*/
public function basePath($path = '')
{
return $this->basePath.($path ? DIRECTORY_SEPARATOR.$path : $path);
return $this->basePath.($path != '' ? DIRECTORY_SEPARATOR.$path : '');
}

/**
Expand All @@ -376,7 +376,7 @@ public function basePath($path = '')
*/
public function bootstrapPath($path = '')
{
return $this->basePath.DIRECTORY_SEPARATOR.'bootstrap'.($path ? DIRECTORY_SEPARATOR.$path : $path);
return $this->basePath.DIRECTORY_SEPARATOR.'bootstrap'.($path != '' ? DIRECTORY_SEPARATOR.$path : '');
}

/**
Expand All @@ -387,7 +387,7 @@ public function bootstrapPath($path = '')
*/
public function configPath($path = '')
{
return $this->basePath.DIRECTORY_SEPARATOR.'config'.($path ? DIRECTORY_SEPARATOR.$path : $path);
return $this->basePath.DIRECTORY_SEPARATOR.'config'.($path != '' ? DIRECTORY_SEPARATOR.$path : '');
}

/**
Expand All @@ -398,7 +398,7 @@ public function configPath($path = '')
*/
public function databasePath($path = '')
{
return ($this->databasePath ?: $this->basePath.DIRECTORY_SEPARATOR.'database').($path ? DIRECTORY_SEPARATOR.$path : $path);
return ($this->databasePath ?: $this->basePath.DIRECTORY_SEPARATOR.'database').($path != '' ? DIRECTORY_SEPARATOR.$path : '');
}

/**
Expand All @@ -424,7 +424,7 @@ public function useDatabasePath($path)
*/
public function langPath($path = '')
{
return $this->langPath.($path ? DIRECTORY_SEPARATOR.$path : '');
return $this->langPath.($path != '' ? DIRECTORY_SEPARATOR.$path : '');
}

/**
Expand Down Expand Up @@ -487,7 +487,7 @@ public function useStoragePath($path)
*/
public function resourcePath($path = '')
{
return $this->basePath.DIRECTORY_SEPARATOR.'resources'.($path ? DIRECTORY_SEPARATOR.$path : $path);
return $this->basePath.DIRECTORY_SEPARATOR.'resources'.($path != '' ? DIRECTORY_SEPARATOR.$path : '');
}

/**
Expand All @@ -502,7 +502,7 @@ public function viewPath($path = '')
{
$basePath = $this['config']->get('view.paths')[0];

return rtrim($basePath, DIRECTORY_SEPARATOR).($path ? DIRECTORY_SEPARATOR.$path : $path);
return rtrim($basePath, DIRECTORY_SEPARATOR).($path != '' ? DIRECTORY_SEPARATOR.$path : '');
}

/**
Expand Down