Sleimanx2\Plastic\Console\Mapping\Run::prepareDatabase PHP Method

prepareDatabase() protected method

protected prepareDatabase ( )
    protected function prepareDatabase()
    {
        $this->mapper->setConnection($this->option('database'));
        if (!$this->mapper->repositoryExists()) {
            $options = ['--database' => $this->option('database')];
            $this->call('mapping:install', $options);
        }
    }