PHPackages                             fector/harvest - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. fector/harvest

AbandonedArchivedLibrary[Database &amp; ORM](/categories/database)

fector/harvest
==============

A simple library that provide modify Model by request query

v0.3.4(7y ago)71.2k6MITPHPPHP &gt;=7.1

Since Feb 1Pushed 7y ago1 watchersCompare

[ Source](https://github.com/Fector/Harvester)[ Packagist](https://packagist.org/packages/fector/harvest)[ RSS](/packages/fector-harvest/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (5)Versions (16)Used By (0)

[![Build Status](https://camo.githubusercontent.com/5a24ee35759f07eb9dddb0986ed63371cfa84e4c5586bc2a2c308314881e1587/68747470733a2f2f7472617669732d63692e6f72672f736861686f622f4861727665737465722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/shahob/Harvester)

A simple library that provide modify Model by request query
-----------------------------------------------------------

[](#a-simple-library-that-provide-modify-model-by-request-query)

### Installation

[](#installation)

Install the package through composer

```
composer require fector/harvest
```

Publish config

```
php artisan vendor:publish

```

Once composer finished add the service provider to the `providers` array in `app/config/app.php`:

```
Fector\Harvest\HarvestServiceProvider::class,

```

Set an alias in `app.php`:

```
'Harvester' => Fector\Harvest\Facades\Harvester::class

```

That's it!

### Configuration

[](#configuration)

To override the configuration, create a file called `harvest.php` in the config folder of your app.
The option combines contains a list of request handlers. Where the key is the query parameter key and the value of the class name that will handle the value.

### Usage

[](#usage)

```
use Fector\Harvest\Facades\Harvester;

/**
 * Display the resource collection
 *
 * @param Request $request
 * @return BooksCollection
 */
public function index(Request $request): BooksCollection
{
    $books = Book::where('status', 1);
    $books = Harvester::recycle($communities)->paginate();
    return new BooksCollection($communities);
}
```

#### Default Combines

[](#default-combines)

##### Sorter

[](#sorter)

Two ways of sorting: ascending

```
/api/books?_sort=title

```

and descending with prefix "-"

```
/api/books?_sort=-title

```

##### Collector

[](#collector)

You may specify which relationships should be eager loaded with data. Collector load relation if it exists.

```
/api/books?_with=authors

```

or

```
/api/books?_with=authors,publisher

```

##### Selector

[](#selector)

You may specify which fields should be loaded.

```
/api/books?_select=title

```

or

```
/api/books?_select=title,publisher

```

Plan to add new default Combines: Limiter, Skipper, Filter.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~26 days

Recently: every ~53 days

Total

15

Last Release

2663d ago

PHP version history (2 changes)0.1PHP ^7.1

v0.2.3PHP &gt;=7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/438e2e4dbdce8f06a93c630819cb5f5c33f83777816184562f05b638c2a180cd?d=identicon)[Fector](/maintainers/Fector)

---

Top Contributors

[![shahob](https://avatars.githubusercontent.com/u/1267717?v=4)](https://github.com/shahob "shahob (8 commits)")[![creatortsv](https://avatars.githubusercontent.com/u/38066653?v=4)](https://github.com/creatortsv "creatortsv (7 commits)")[![Fector](https://avatars.githubusercontent.com/u/4113067?v=4)](https://github.com/Fector "Fector (5 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/fector-harvest/health.svg)

```
[![Health](https://phpackages.com/badges/fector-harvest/health.svg)](https://phpackages.com/packages/fector-harvest)
```

###  Alternatives

[clickbar/laravel-magellan

This package provides functionality for working with the postgis extension in Laravel.

423715.4k1](/packages/clickbar-laravel-magellan)[genealabs/laravel-pivot-events

This package introduces new eloquent events for sync(), attach(), detach() or updateExistingPivot() methods on BelongsToMany relation.

1404.9M8](/packages/genealabs-laravel-pivot-events)[jerome/filterable

Streamline dynamic Eloquent query filtering with seamless API request integration and advanced caching strategies.

19226.1k](/packages/jerome-filterable)[reedware/laravel-relation-joins

Adds the ability to join on a relationship by name.

2121.2M13](/packages/reedware-laravel-relation-joins)[dragon-code/migrate-db

Easy data transfer from one database to another

15717.4k](/packages/dragon-code-migrate-db)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
