Browse Source

Update docs and runaway semicolon.

master
Tom Lingham 8 years ago
parent
commit
31d7a1c54e
  1. 6
      README.md
  2. 2
      src/SearchDrivers/BaseSearchDriver.php

6
README.md

@ -74,6 +74,12 @@ For example, if you want to search the name, email address and username of a use
$users = Searchy::users('name', 'email', 'username')->query('John Smith')->get();
```
If you need to build your table list dynamically, you can also pass an array of fields instead as the first argument (All other following arguments will be ignored):
```php
$users = Searchy::users(['name', 'email', 'username'])->query('John Smith')->get();
```
### Searching Joined/Concatenated Columns
Sometimes you may want to leverage searches on concatenated column. For example, on a `first_name` and `last_name` field but you only want to run the one query. To do this can separate columns with a double colon:

2
src/SearchDrivers/BaseSearchDriver.php

@ -125,7 +125,7 @@ abstract class BaseSearchDriver implements SearchDriverInterface
return $this->query
->orderBy($this->relevanceFieldName, 'desc')
->having($this->relevanceFieldName, '>', 0);;
->having($this->relevanceFieldName, '>', 0);
}
/**

Loading…
Cancel
Save