PHPackages                             limewell/laravel-macros - 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. limewell/laravel-macros

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

limewell/laravel-macros
=======================

laravel macros

13PHP

Since Jun 22Pushed 3y ago1 watchersCompare

[ Source](https://github.com/limewell/laravel-macros)[ Packagist](https://packagist.org/packages/limewell/laravel-macros)[ RSS](/packages/limewell-laravel-macros/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

laravel-macros
==============

[](#laravel-macros)

[![Latest Version on Packagist](https://camo.githubusercontent.com/c046721f0655627b07f3b0d0b82bbe12c2ecf8272f64d4f7e1c1b7c08f39f2d6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c696d6577656c6c2f6c61726176656c2d6d6163726f732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/limewell/laravel-macros)[![Total Downloads](https://camo.githubusercontent.com/6e41ffac40a3505de17173f1e956564938f0866ca34486221c7ef64adaca8dce/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c696d6577656c6c2f6c61726176656c2d6d6163726f732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/limewell/laravel-macros)[![GitHub Actions](https://github.com/limewell/laravel-macros/actions/workflows/main.yml/badge.svg)](https://github.com/limewell/laravel-macros/actions/workflows/main.yml/badge.svg)

This is where your description should go. Try and limit it to a paragraph or two, and maybe throw in a mention of what PSRs you support to avoid any confusion with users and contributors.

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

[](#installation)

You can install the package via composer:

```
composer require limewell/laravel-macros
```

Usage
-----

[](#usage)

### Eloquent Builder

[](#eloquent-builder)

withWhereHas()

```
User::query()
    ->withWhereHas('subscriptions', function ($query) {
        $query->where('package_id', 4)->withWhereHas('package');
    })
    ->get();
```

### Schema Blueprint

[](#schema-blueprint)

hasForeign()

```
Schema::table('subscriptions', function (Blueprint $table) {
    if($table->hasForeign('subscriptions_package_id_foreign')){
        //
    }
});
```

### Collection

[](#collection)

loadWithLimit()

```
Country::all()
    ->loadWithLimit(['states' => function($query){
        $query->limit(1);
    }]);
```

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

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

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

[](#contributing)

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

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Dipesh Sukhia](https://github.com/limewell)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity25

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/0712598e4c6d2504f39f656b2bae2f0d96681f324bbedbf0137b925d097006dd?d=identicon)[dipeshsukhia](/maintainers/dipeshsukhia)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/limewell-laravel-macros/health.svg)

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

###  Alternatives

[cleaniquecoders/shrinkr

Shrinkr is a Laravel package for shortening URLs, with custom slugs, analytics, branded domains, and seamless API integration.

142.9k](/packages/cleaniquecoders-shrinkr)

PHPackages © 2026

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