Skip to content

Commit

Permalink
Basic installation and usage instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
DivineOmega committed Nov 22, 2019
1 parent d674e5f commit 0231137
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,26 @@
# laravel-natural-where
# Laravel Natural Where

Laravel Natural Where extends the Laravel query builder to allow expressing of
where operators in natural language.

## Installation

To install Laravel Natural Where, run the following command from the
root of your project.

```bash
composer require divineomega/laravel-natural-where
```

## Usage

See the basic usage example below.

```php
$query = \App\User::query()
->naturalWhere('created_at', 'is between the years', ['2018', '2020'])
->naturalWhere('email', 'contains the word', 'jordan')
->naturalWhere('name', 'is not', 'Jordan Smith')
->naturalWhere('id', 'is one of the following', [1, 2, 3])
->get();
```

0 comments on commit 0231137

Please sign in to comment.