PHPackages                             allenjd3/scopify - 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. allenjd3/scopify

ActiveLibrary

allenjd3/scopify
================

This package allows you to quickly create filters and query objects and use them in your laravel scopes.

0.1.1(2y ago)08[4 PRs](https://github.com/allenjd3/scopify/pulls)MITPHPPHP ^8.1CI passing

Since Oct 31Pushed 1mo ago1 watchersCompare

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

READMEChangelogDependencies (13)Versions (7)Used By (0)

Scopify
=======

[](#scopify)

[![Latest Version on Packagist](https://camo.githubusercontent.com/b7015b7e72ab83f9125dd11fe07926a0969d1bb73aa77238ebae146c747ab922/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616c6c656e6a64332f73636f706966792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/allenjd3/scopify)[![GitHub Tests Action Status](https://camo.githubusercontent.com/cc7615bb5c6d10e8a56f7326b0b7b83cd87f498841dc0f6a7d92a0d011d6c951/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f616c6c656e6a64332f73636f706966792f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/allenjd3/scopify/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/92edf2974baabc62df408dea5a0aadd05f5e99320d749bed40eaf815f703e718/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f616c6c656e6a64332f73636f706966792f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/allenjd3/scopify/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/93a195a75afef93f5ab9d95bc243b4683f8834089bda7d50316f844e738897ed/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616c6c656e6a64332f73636f706966792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/allenjd3/scopify)

This package allows you to quickly create filters and query objects and use them in your laravel scopes.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require allenjd3/scopify
```

You can publish the config file with:

```
php artisan vendor:publish --tag="scopify-config"
```

This is the contents of the published config file:

```
return [
    'default-namespace' => 'App\\Filters',
];
```

Usage
-----

[](#usage)

Create a new filter with

```
php artisan make:scopify YourFilter
```

Then in your model, add the Filterable trait

```
class User extends Authenticatable
{
    use Filterable;
}
```

Then you can use your filters like this-

```
...
public function scopeMyScope($query)
{
    return (new App\Filters\MyFilter)->call($query)
}
```

Optionally you can also override the scopifyFilters method to add scopes

```
protected function scopifyFilters()
{
    return [
        'myScope' => MyFilter::class,
    ];
}
```

You can now use your scope like you normally would- `User::myScope()->get()`

Applying Multiple Filters
-------------------------

[](#applying-multiple-filters)

You can apply multiple filters like this-

```
User::filters([
    MyFilter::class,
    MyOtherFilter::class,
])->get();
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [James Allen](https://github.com/allenjd3)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance61

Regular maintenance activity

Popularity4

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 55.1% 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

Every ~1 days

Total

2

Last Release

921d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/44b6019e7c6e6f731c2eabfc1092af1bc2a55025c80b7718f5707014f2a975c1?d=identicon)[jdallen5](/maintainers/jdallen5)

---

Top Contributors

[![allenjd3](https://avatars.githubusercontent.com/u/8092154?v=4)](https://github.com/allenjd3 "allenjd3 (27 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (12 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (10 commits)")

---

Tags

laravelallenjd3scopify

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/allenjd3-scopify/health.svg)

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

###  Alternatives

[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[spatie/laravel-prometheus

Export Laravel metrics to Prometheus

2651.3M6](/packages/spatie-laravel-prometheus)[hydrat/filament-table-layout-toggle

Filament plugin adding a toggle button to tables, allowing user to switch between Grid and Table layouts.

6292.3k1](/packages/hydrat-filament-table-layout-toggle)[scalar/laravel

Render your OpenAPI-based API reference

6183.9k2](/packages/scalar-laravel)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[musahmusah/laravel-multipayment-gateways

A Laravel Package that makes implementation of multiple payment Gateways endpoints and webhooks seamless

852.2k1](/packages/musahmusah-laravel-multipayment-gateways)

PHPackages © 2026

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