PHPackages                             scratchuz4k/laravel-dataprovider - 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. scratchuz4k/laravel-dataprovider

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

scratchuz4k/laravel-dataprovider
================================

This package allows you to query the db via requests

1.0.0(2y ago)14proprietaryPHPPHP ^8.2

Since Apr 1Pushed 1y ago1 watchersCompare

[ Source](https://github.com/scratchuz4k/laravel-dataprovider)[ Packagist](https://packagist.org/packages/scratchuz4k/laravel-dataprovider)[ RSS](/packages/scratchuz4k-laravel-dataprovider/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Laravel Dataprovider
====================

[](#laravel-dataprovider)

This package allows you to filter, sort and include eloquent relations based on a request. The `DataProvider` used in this package uses Laravel's default Eloquent builder and the Illuminate Request.

```
composer require scratchuz4k/laravel-dataprovider
```

Basic usage
-----------

[](#basic-usage)

Just intanciate the provider and return its get method and you're good to go.

```
use Scratchuz4k\Laravel\DataProvider;

$dataProvider = new DataProvider(Article::class);
return $dataProvider->get($request);
```

Available operators
-------------------

[](#available-operators)

- equals
- not\_equals
- contains
- starts\_with
- ends\_with
- greater\_than
- less\_than
- greater\_than\_or\_equal\_to
- less\_than\_or\_equal\_to
- is\_null

Queries Examples
----------------

[](#queries-examples)

- Basic filter:

```
/articles?
filters[0][column]=id&
filters[0][operator]=equals&
filters[0][value]=1
```

- Or filter:

```
/articles?
filters[0][column]=id&
filters[0][operator]=equals&
filters[0][value]=1&

filters[1][column]=id&
filters[1][operator]=equals&
filters[1][value]=2&
filters[1][function]=orWhere
```

- Including relations:

```
/article?
with=categories
```

The relations included should be the relations present in the Model.

- Sorting a query:

```
/articles?
sortOrder=asc&
sortBy=id
```

- Filter relations:

```
/articles?
filters[0][column]=categories.id&
filters[0][operator]=equals&
filters[0][value]=1
```

The relations filtered should be the relations present in the Model.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance27

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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

Unknown

Total

1

Last Release

771d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bf80a284020297cd644a66e226e620f02ac76ff6d6f297eb40cf257d9928d859?d=identicon)[scratchuz4k](/maintainers/scratchuz4k)

---

Top Contributors

[![scratchuz4k](https://avatars.githubusercontent.com/u/20198068?v=4)](https://github.com/scratchuz4k "scratchuz4k (9 commits)")

### Embed Badge

![Health badge](/badges/scratchuz4k-laravel-dataprovider/health.svg)

```
[![Health](https://phpackages.com/badges/scratchuz4k-laravel-dataprovider/health.svg)](https://phpackages.com/packages/scratchuz4k-laravel-dataprovider)
```

###  Alternatives

[anourvalar/eloquent-serialize

Laravel Query Builder (Eloquent) serialization

11320.2M21](/packages/anourvalar-eloquent-serialize)[overtrue/laravel-versionable

Make Laravel model versionable.

585308.0k5](/packages/overtrue-laravel-versionable)[abbasudo/laravel-purity

elegant way to add filter and sort in laravel

514330.5k1](/packages/abbasudo-laravel-purity)[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135192.6k5](/packages/statamic-rad-pack-runway)[dragon-code/laravel-deploy-operations

Performing any actions during the deployment process

240173.5k2](/packages/dragon-code-laravel-deploy-operations)[stayallive/laravel-eloquent-observable

Register Eloquent model event listeners just-in-time directly from the model.

2928.9k7](/packages/stayallive-laravel-eloquent-observable)

PHPackages © 2026

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