Get the path to the migration directory.

@return string
345095
protected function getMigrationPaths()
    {
        if ($this->input->hasOption('path') && $this->option('path')) {
            return parent::getMigrationPaths();
        }

        // Tenant migrations path is configured.
        if (($path = config('tenancy.db.tenant-migrations-path')) && ! empty($path)) {
            return (array) $path;
        }

        throw new InvalidArgumentException("To prevent unwanted migrations from database/migrations, always specify a path.");
    }
866233
public function getPath()
	{
		$path = getcwd() . DIRECTORY_SEPARATOR . $this->path;

		if (substr($this->path, 0, 1) == '/' || substr($this->path, 1, 1) == ':') {
			$path = $this->path;
		}

		return realpath($path);
	}
1307489
public static function getRootPath()
        {
            if (is_null(static::$_filePath)) {
                if (defined('APPLICATION_PATH')) {
                    static::$_filePath = APPLICATION_PATH;
                } else {
                    static::$_filePath = dirname(dirname(__FILE__));
                }
            }
            return static::$_filePath;
        }
765486
protected function getMigrationFiles()
    {
        if ($this->_migrationFiles === null) {
            $this->_migrationFiles = [];
            $directories = $this->getDirectories();

            foreach ($directories as $namespace => $dir) {
                if ($dir && is_dir($dir)) {
                    $handle = opendir($dir);
                    while (($file = readdir($handle)) !== false) {
                        if ($file === '.' || $file === '..') {
                            continue;
                        }
                        $path = $dir . DIRECTORY_SEPARATOR . $file;
                        if (preg_match('/^(m(\d{6}_?\d{6})\D.*?)\.php$/is', $file, $matches) && is_file($path)) {
                            $class = (is_int($namespace) ? '' : $namespace . '\\') . $matches[1];
                            if ($this->baseMigrationClass) {
                                try {
                                    require_once $path;
                                    if (is_subclass_of($class, $this->baseMigrationClass)) {
                                        $this->_migrationFiles[$class] = $path;
                                    }
                                } catch (\Exception $exc) {
                                    echo $exc->getMessage();
                                }
                            } else {
                                $this->_migrationFiles[$class] = $path;
                            }
                        }
                    }
                    closedir($handle);
                }
            }
        }

        return $this->_migrationFiles;
    }
963148
public function migrate()
    {
        // find migrations
        $folders = $this->app->pathfinder->search('dbupdates', '', 'path');
        // todo - sort files in folders
        foreach ($folders as $dir) {
            $files = scandir($dir);
            sort($files);
            foreach ($files as $name) {
                if (strtolower(substr($name, -4)) != '.sql') {
                    continue;
                }
                $q = $this->db->dsql()
                    ->table('_db_update')
                    ->where('name', strtolower($name))
                    ->field('status');
                if ($q->getOne() === 'ok') {
                    continue;
                }
                $migration = file_get_contents($dir.'/'.$name);
                $q->set('name', strtolower($name));
                try {
                    $this->db->dbh->exec($migration);
                    $q->set('status', 'ok')->replace();
                } catch (Exception $e) {
                    $q->set('status', 'fail')->replace();
                    if (!$e instanceof BaseException) {
                        $e = $this->exception()
                            ->addMoreInfo('Original error', $e->getMessage());
                    }
                    throw $e->addMoreInfo('file', $name);
                }
            }
        }

        return $this;
    }
892507
protected function getPath(): string
    {
        $directory = config('menus.directory');

        if (! $directory) {
            throw new DirectoryNotFound('Directory with menu files does not exist.');
        }

        $path = $this->file->exists(base_path($directory)) ? base_path($directory) : __DIR__ . '/../resources/menus';

        return $path;
    }
295033
protected function getMigrationPath()
	{
		$path = $this->input->getOption('path');

		// First, we will check to see if a path option has been defined. If it has
		// we will use the path relative to the root of this installation folder
		// so that migrations may be run for any path within the applications.
		if ( ! is_null($path))
		{
			return $this->flyphp['path.base'].'/'.$path;
		}

		$package = $this->input->getOption('package');

		// If the package is in the list of migration paths we received we will put
		// the migrations in that path. Otherwise, we will assume the package is
		// is in the package directories and will place them in that location.
		if ( ! is_null($package))
		{
			return $this->packagePath.'/'.$package.'/src/migrations';
		}

		$bench = $this->input->getOption('bench');

		// Finally we will check for the workbench option, which is a shortcut into
		// specifying the full path for a "workbench" project. Workbenches allow
		// developers to develop packages along side a "standard" app install.
		if ( ! is_null($bench))
		{
			$path = "/workbench/{$bench}/src/migrations";

			return $this->flyphp['path.base'].$path;
		}

		return $this->flyphp['path'].'/database/migrations';
	}
1110629
protected function getPath()
	{
		$path = $this->input->getOption('path');

		if (is_null($path))
		{
			return $this->flyphp['path'].'/commands';
		}
		else
		{
			return $this->flyphp['path.base'].'/'.$path;
		}
	}
1019668
public function getPathToTemporaryDirectory()
    {
        if ($this->temporaryDirectory !== null) {
            return $this->temporaryDirectory;
        }

        $this->temporaryDirectory = $this->createTemporaryDirectory($this->temporaryDirectoryBase);

        return $this->temporaryDirectory;
    }
710767
public function getPath() : string
    {
        if ($this->fullPath !== null) {
            return $this->fullPath;
        }

        $path = $this->getSetting('path');

        if (is_dir($path)) {
            $this->verified = true;

            return $this->fullPath = realpath($path);
        }

        $pubPath = public_path(trim($path, '/'));

        $this->verified = is_dir($pubPath);

        return $this->fullPath = $pubPath;
    }
1106610
public function getCachePath() {
		if ($this->path === null) {
			$this->path = rtrim(sys_get_temp_dir(), DIRECTORY_SEPARATOR);
		}
		
		return $this->path;
	}
512453
public function getRepository()
    {
        $repository = MigrationsRepository::getInstance()
            ->setCommand($this)
            ->setIo($this->io);

        $repository['path'] = $this->console->get('migration.dir') ?: $this->console->get('path.migrations');

        return $repository;
    }
692247
public function getRelativePath()
    {
        $templates = $this->config['directories']['templates'];

        $extension = $this->config['templates']['extension'];

        return $templates . '/' . $this->getFilename($extension);
    }
905195
protected function getMigrationPath(): string
    {
        if (! $this->laravel->files->exists($path = $this->laravel['path'].DIRECTORY_SEPARATOR.$this->moduleName())) {
            throw new \Exception("Invalid path: {$path}");
        }

        return $path.DIRECTORY_SEPARATOR.'database'.DIRECTORY_SEPARATOR.'migrations';
    }
540006
public function getExternalPath() {
        if (true === $this->_config->getConfigData('development_environment')) {
            $extPath = EXT_ROOT . $this->_config->getConfigData('base_path_dev');
        } else {
            $extPath = EXT_ROOT . $this->_config->getConfigData('base_path');
        }
        return $extPath;
    }
482624
public function getFilesPath() {
		$repo = $this->getServiceContainer()->getResourceRepository();
		if (!$repo->contains($this->getFilesPuliPath())) {
			$dir = new Directory($repo->get('/files')->getFilesystemPath());
			$path = $dir->toPath()->append('managed/' . $this->model->getName());
			$dir = new Directory($path);
			$dir->make();
		}
		$dir = new Directory($repo->get($this->getFilesPuliPath())->getFilesystemPath());

		return $dir->toPath();
	}
96828
public static function getMigrationVersion()
    {
        if (self::isInstallerAvailable()) {
            $migrations = scandir(DOCROOT . '/install/migrations');
            $migration_file = end($migrations);
            $migration_class = 'migration_' . str_replace('.', '', substr($migration_file, 0, -4));
            return call_user_func(array($migration_class, 'getVersion'));
        }

        return false;
    }