original_string: public function scopeSearch(Builder $query, array $search = [])
      {
          if (empty($search)) {
              return $query;
          }
  
          if (!array_intersect(array_keys($search), $this->searchable)) {
              return $query;
          }
  
          return $query->where($search);
      }
code: public function scopeSearch(Builder $query, array $search = [])
      {
          if (empty($search)) {
              return $query;
          }
  
          if (!array_intersect(array_keys($search), $this->searchable)) {
              return $query;
          }
  
          return $query->where($search);
      }
code_tokens: public function scopeSearch ( Builder $ query , array $ search = [ ] ) { if ( empty ( $ search ) ) { return $ query ; } if ( ! array_intersect ( array_keys ( $ search ) , $ this -> searchable ) ) { return $ query ; } return $ query -> where ( $ search ) ; }
docstring: Adds a search scope.
  
  @param \Illuminate\Database\Eloquent\Builder $query
  @param array                                 $search
  
  @return \Illuminate\Database\Eloquent\Builder
docstring_tokens: Adds a search scope .