Sleimanx2\Plastic\Mappings\Mapper::repositoryExists PHP Method

repositoryExists() public method

Check if the mappings repository exists.
public repositoryExists ( ) : mixed
return mixed
    public function repositoryExists()
    {
        return $this->repository->exits();
    }

Usage Example

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