Skip to content

Commit

Permalink
Rem micro optimization to improve Laravel compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
octoberapp committed Jul 7, 2023
1 parent 159791b commit 376230e
Showing 1 changed file with 1 addition and 30 deletions.
31 changes: 1 addition & 30 deletions src/Foundation/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,9 @@ protected function registerBaseServiceProviders()
*/
protected function bindPathsInContainer()
{
// Laravel paths (see parent class)
$this->instance('path', $this->path());
$this->instance('path.base', $this->basePath());
$this->instance('path.config', $this->configPath());
$this->instance('path.public', $this->publicPath());
$this->instance('path.storage', $this->storagePath());
$this->instance('path.database', $this->databasePath());
$this->instance('path.resources', $this->resourcePath());
$this->instance('path.bootstrap', $this->bootstrapPath());
parent::bindPathsInContainer();

// October CMS paths
$this->instance('path.lang', $this->langPath());
$this->instance('path.plugins', $this->pluginsPath());
$this->instance('path.themes', $this->themesPath());
$this->instance('path.cache', $this->cachePath());
Expand All @@ -95,26 +86,6 @@ public function hasPublicFolder()
return file_exists($this->basePath('public'));
}

/**
* langPath returns the path to the lang directory
* @param string $path
* @return string
*/
public function langPath($path = '')
{
return $this->joinPaths($this->langPath ?: $this->basePath('lang'), $path);
}

/**
* storagePath returns the path to the storage directory
* @param string $path
* @return string
*/
public function storagePath($path = '')
{
return $this->joinPaths($this->storagePath ?: $this->basePath('storage'), $path);
}

/**
* cachePath return path for cache files
* @param string $path
Expand Down

0 comments on commit 376230e

Please sign in to comment.