PHPackages                             syntech/globalscopes - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. syntech/globalscopes

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

syntech/globalscopes
====================

A Laravel package to add general model scopes to all models

2.0.1(11mo ago)13491MITPHPPHP ^8.0

Since Aug 3Pushed 11mo ago1 watchersCompare

[ Source](https://github.com/mokhdesigns/syntech-globalscopes)[ Packagist](https://packagist.org/packages/syntech/globalscopes)[ RSS](/packages/syntech-globalscopes/feed)WikiDiscussions main Synced 2d ago

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

Syntech Globalscopes
====================

[](#syntech-globalscopes)

A Laravel package for adding global model scopes and attributes without modifying individual models.

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

[](#installation)

You can install the package via Composer:

```
composer require syntech/globalscopes
```

Configuration
-------------

[](#configuration)

Publish the configuration file:

```
php artisan vendor:publish --provider="Syntech\GlobalScopes\GlobalScopesServiceProvider"
```

This will create a globalscopes.php configuration file in the config directory of your Laravel application.

Example Configuration
---------------------

[](#example-configuration)

```
return [

       /*
    |--------------------------------------------------------------------------
    | Global Query Methods
    |--------------------------------------------------------------------------
    |
    | Define any global query methods that should be available across all
    | Eloquent models. These methods can be used to add commonly used query
    | functionality to all models.
    |
    | Example:
    | 'active' => function () {
    |    return $this->where('status', 1);
    | },
    |
    */

    'methods' => [
        'active' => function () {
            return $this->where('status', 1);
        },
        'someMore' => function () {
                    // add more ...
            }
    ],

];
```

Usage
-----

[](#usage)

Adding Global Scopes

Once configured, the global scopes will automatically be applied to all Eloquent models. Adding Global Attributes

Global attributes can be accessed as if they are defined directly on the model:

$customers = Customer::active()-&gt;get();

return $customers; // Uses the global attribute logic

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance50

Moderate activity, may be stable

Popularity16

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% 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 ~174 days

Total

3

Last Release

352d ago

Major Versions

1.0.0 → 2.0.02024-10-27

### Community

Maintainers

![](https://www.gravatar.com/avatar/8aa092c27a5563bfb4a0fcb4d602f0857db0fc1947f2a6ce70e40a2ab055426b?d=identicon)[Mokhtar ali](/maintainers/Mokhtar%20ali)

---

Top Contributors

[![devmokhtar14](https://avatars.githubusercontent.com/u/261612676?v=4)](https://github.com/devmokhtar14 "devmokhtar14 (7 commits)")[![mokhdesigns](https://avatars.githubusercontent.com/u/41319367?v=4)](https://github.com/mokhdesigns "mokhdesigns (4 commits)")[![Mokhtarali12](https://avatars.githubusercontent.com/u/214580268?v=4)](https://github.com/Mokhtarali12 "Mokhtarali12 (3 commits)")

### Embed Badge

![Health badge](/badges/syntech-globalscopes/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[renatomarinho/laravel-page-speed

Laravel Page Speed

2.5k1.7M11](/packages/renatomarinho-laravel-page-speed)[illuminate/pagination

The Illuminate Pagination package.

12234.1M1.0k](/packages/illuminate-pagination)[illuminate/pipeline

The Illuminate Pipeline package.

9349.2M282](/packages/illuminate-pipeline)[illuminate/redis

The Illuminate Redis package.

8314.6M375](/packages/illuminate-redis)[illuminate/cookie

The Illuminate Cookie package.

244.6M136](/packages/illuminate-cookie)

PHPackages © 2026

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