Skip to content

Commit

Permalink
Improve doc
Browse files Browse the repository at this point in the history
  • Loading branch information
wallacemaxters committed Nov 6, 2021
1 parent 154c408 commit 53a3309
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,29 @@ class User extends Model
}
```

... Or with implementation of `Filterable` method:


```php

use LaravelLegends\EloquentFilter\HasFilter;
use LaravelLegends\EloquentFilter\Contracts\Filterable;

class User extends Model implements Filterable
{
use HasFilter;

public function getFilterable(): array
{
return [
'name' => 'contains',
'phone.number' => 'contains',
'price' => ['max', 'min'],
'profile_id' => '*',
];
}
}
```

### Using the allow method

Expand Down

0 comments on commit 53a3309

Please sign in to comment.