original_string: public function findBy(array $wheres, array $options = [])
      {
          $query = $this->getSqlObject()->select();
  
          $this->setColumns($query, $options);
  
          $wheres = $this->addJoins($query, $wheres, $options);
  
          $this->addWheres($query, $wheres, $options);
  
          if (Arr::get($options, 'order')) {
              $this->setOrder($query, $options['order']);
          }
  
          return $this->executeAndGetResultsAsEntity($query);
      }
code: public function findBy(array $wheres, array $options = [])
      {
          $query = $this->getSqlObject()->select();
  
          $this->setColumns($query, $options);
  
          $wheres = $this->addJoins($query, $wheres, $options);
  
          $this->addWheres($query, $wheres, $options);
  
          if (Arr::get($options, 'order')) {
              $this->setOrder($query, $options['order']);
          }
  
          return $this->executeAndGetResultsAsEntity($query);
      }
code_tokens: public function findBy ( array $ wheres , array $ options = [ ] ) { $ query = $ this -> getSqlObject ( ) -> select ( ) ; $ this -> setColumns ( $ query , $ options ) ; $ wheres = $ this -> addJoins ( $ query , $ wheres , $ options ) ; $ this -> addWheres ( $ query , $ wheres , $ options ) ; if ( Arr :: get ( $ options , 'order' ) ) { $ this -> setOrder ( $ query , $ options [ 'order' ] ) ; } return $ this -> executeAndGetResultsAsEntity ( $ query ) ; }
docstring: Find a single entity by specific field values
  
  @param  array  $wheres An array of where conditions in the format:
  ['column' => 'value'] or
  ['column', 'operator', 'value']
  @param  array  $options
  @return AbstractEntity|bool
docstring_tokens: Find a single entity by specific field values