14
README.md
14
README.md
@ -1,5 +1,3 @@
|
|||||||

|
|
||||||
|
|
||||||
## Laravel 5+ Searchy
|
## Laravel 5+ Searchy
|
||||||
|
|
||||||
### Database Searching Made Easy
|
### Database Searching Made Easy
|
||||||
@ -98,7 +96,7 @@ Sometimes you may want to leverage searches on concatenated column. For example,
|
|||||||
$users = Searchy::users('first_name::last_name')->query('John Smith')->get();
|
$users = Searchy::users('first_name::last_name')->query('John Smith')->get();
|
||||||
```
|
```
|
||||||
|
|
||||||
### Soft Deleted Records
|
### Soft Deleted Records
|
||||||
|
|
||||||
By default soft deletes will not be included in your results. However, if you wish to include soft deleted records you can do so by adding the `withTrashed()` after specifying your table and fields;
|
By default soft deletes will not be included in your results. However, if you wish to include soft deleted records you can do so by adding the `withTrashed()` after specifying your table and fields;
|
||||||
|
|
||||||
@ -147,7 +145,7 @@ return [
|
|||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
You can publish the configuration file to your `app` directory and override the settings by running `php artisan vendor:publish` to copy the configuration to your config folder as `searchy.php`
|
You can publish the configuration file to your `app` directory and override the settings by running `php artisan vendor:publish` to copy the configuration to your config folder as `searchy.php`
|
||||||
|
|
||||||
@ -159,7 +157,7 @@ You can also override these methods using the following syntax when running a se
|
|||||||
Searchy::driver('fuzzy')->users('name')->query('Batman')->get();
|
Searchy::driver('fuzzy')->users('name')->query('Batman')->get();
|
||||||
```
|
```
|
||||||
|
|
||||||
## Drivers
|
## Drivers
|
||||||
|
|
||||||
Searchy takes advantage of 'Drivers' to handle matching various conditions of the fields you specify.
|
Searchy takes advantage of 'Drivers' to handle matching various conditions of the fields you specify.
|
||||||
|
|
||||||
@ -206,7 +204,7 @@ protected $matchers = [
|
|||||||
];
|
];
|
||||||
```
|
```
|
||||||
|
|
||||||
## Matchers
|
## Matchers
|
||||||
|
|
||||||
### ExactMatcher
|
### ExactMatcher
|
||||||
|
|
||||||
@ -255,7 +253,7 @@ For example, a search for 'tha' would match; 'I hope that that cat has caught th
|
|||||||
|
|
||||||
See *Levenshtein Driver*
|
See *Levenshtein Driver*
|
||||||
|
|
||||||
## Extending
|
## Extending
|
||||||
|
|
||||||
### Drivers
|
### Drivers
|
||||||
|
|
||||||
@ -265,7 +263,7 @@ It's really easy to roll your own search drivers. Simply create a class that ext
|
|||||||
|
|
||||||
To create your own matchers, you can create your own class that extends `TomLingham\Searchy\Matchers\BaseMatcher` and (for simple Matchers) override the `formatQuery` method to return a string formatted with `%` wildcards in required locations. For more advanced extensions you may need to override the `buildQuery` method and others as well.
|
To create your own matchers, you can create your own class that extends `TomLingham\Searchy\Matchers\BaseMatcher` and (for simple Matchers) override the `formatQuery` method to return a string formatted with `%` wildcards in required locations. For more advanced extensions you may need to override the `buildQuery` method and others as well.
|
||||||
|
|
||||||
## Contributing & Reporting Bugs
|
## Contributing & Reporting Bugs
|
||||||
|
|
||||||
If you would like to improve on the code that is here, feel free to submit a pull request.
|
If you would like to improve on the code that is here, feel free to submit a pull request.
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user