Laravel\Lumen\Application::basePath PHP Метод

basePath() публичный Метод

Get the base path for the application.
public basePath ( string | null $path = null ) : string
$path string | null
Результат string
    public function basePath($path = null)
    {
        if (isset($this->basePath)) {
            return $this->basePath . ($path ? '/' . $path : $path);
        }
        if ($this->runningInConsole()) {
            $this->basePath = getcwd();
        } else {
            $this->basePath = realpath(getcwd() . '/../');
        }
        return $this->basePath($path);
    }

Usage Example

 /**
  * After each scenario, reboot the kernel.
  */
 public function reboot()
 {
     Facade::clearResolvedInstances();
     $lumen = new LumenBooter($this->app->basePath());
     $this->context->getSession('lumen')->getDriver()->reboot($this->app = $lumen->boot());
     $this->setAppOnContext();
 }
All Usage Examples Of Laravel\Lumen\Application::basePath