<commit_before>repoflow
========

A simple trait to allow fluently querying repositories with an eloquent model. Gives back the flexibility of eloquent to some extent, while remaining explicit on which methods are supported by a repository.

<commit_msg>Updated readme.<commit_after>repoflow
========

A simple trait to allow fluently querying repositories with an eloquent model. Gives back the flexibility of eloquent to some extent, while remaining explicit on which methods are supported by a repository.

## Using it

Simply: 

1. Add the Pieterdev\Repoflow\FluentRepositoryTrait to your repository class.
2. Add a `protected static $filters= [...]` array to your repository class denoting which properties on your model should be filterable.
3. Have the model your repoository is using as a field called $model on your repository class, or have $model be a string containing the name of the eloquent model used by the repository.
4. You can then do chain queries on your repository, for example `$repo->whereName('Jack')->whereScore(3)->all();
5. The method `all()` invokes the query.

```
<?php

class SomeEloquentRepository implements ISomeRepository {

    use Pieterdev\Repoflow\FluentRepositoryTrait;

    protected static $filters = [
        'name',
        'score'
    ];

    protected User $model;

    function __construct(User $userModel) 
    {
        $this->model = $userModel;
    }
}
```

{'fraction_non_alphanumeric': 0.08008504606661943, 'fraction_numerical': 0.004252303330970942, 'mean_word_length': 4.079136690647482, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '847502', 'n_tokens_mistral': 386, 'n_tokens_neox': 362, 'n_words': 172}