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

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

gnahotelsolutions/laravel-eloquent-macros
=========================================

Some handy eloquent macros used in our applications

1.1.0(3y ago)274MITPHPPHP ^8.0

Since Feb 25Pushed 3y ago1 watchersCompare

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

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

Some handy eloquent macros used in our applications
===================================================

[](#some-handy-eloquent-macros-used-in-our-applications)

[![Latest Version on Packagist](https://camo.githubusercontent.com/5d20ddd6bfee08115188c9db0731a7909a8318555da86aaf74834ed311fbbf39/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f676e61686f74656c736f6c7574696f6e732f6c61726176656c2d656c6f7175656e742d6d6163726f732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/gnahotelsolutions/laravel-eloquent-macros)[![Build Status](https://camo.githubusercontent.com/38c853a62f902885f6c9ce0c67c939fab862d24629b72f9ee8fd893e0814a750/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f676e61686f74656c736f6c7574696f6e732f6c61726176656c2d656c6f7175656e742d6d6163726f732f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/gnahotelsolutions/laravel-eloquent-macros)[![Quality Score](https://camo.githubusercontent.com/326e853057573d64687e94406c2e007b514934667773f84e602581c05141b58c/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f676e61686f74656c736f6c7574696f6e732f6c61726176656c2d656c6f7175656e742d6d6163726f732e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/gnahotelsolutions/laravel-eloquent-macros)[![Total Downloads](https://camo.githubusercontent.com/634de9551d72e57a25e223ec30a105b5f67682db0ddd59712f1c9de001603b9d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f676e61686f74656c736f6c7574696f6e732f6c61726176656c2d656c6f7175656e742d6d6163726f732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/gnahotelsolutions/laravel-eloquent-macros)

[![Logo](https://camo.githubusercontent.com/7df3e2e1dfd53eeffcf1a8c3e5a56203667d61f1c3a1c6b393e9cb108cb3174d/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f4c61726176656c253230456c6f7175656e742532304d6163726f732e706e673f7468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d676e61686f74656c736f6c7574696f6e732532466c61726176656c2d656c6f7175656e742d6d6163726f73267061747465726e3d617263686974656374267374796c653d7374796c655f31266465736372697074696f6e3d536f6d652b68616e64792b656c6f7175656e742b6d6163726f732b757365642b696e2b6f75722b6170706c69636174696f6e73266d643d312673686f7757617465726d61726b3d3126666f6e7453697a653d313030707826696d616765733d70757a7a6c65)](https://camo.githubusercontent.com/7df3e2e1dfd53eeffcf1a8c3e5a56203667d61f1c3a1c6b393e9cb108cb3174d/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f4c61726176656c253230456c6f7175656e742532304d6163726f732e706e673f7468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d676e61686f74656c736f6c7574696f6e732532466c61726176656c2d656c6f7175656e742d6d6163726f73267061747465726e3d617263686974656374267374796c653d7374796c655f31266465736372697074696f6e3d536f6d652b68616e64792b656c6f7175656e742b6d6163726f732b757365642b696e2b6f75722b6170706c69636174696f6e73266d643d312673686f7757617465726d61726b3d3126666f6e7453697a653d313030707826696d616765733d70757a7a6c65)

This package provides a few of our most used Laravel Eloquent macros that we have to write in almost every project. Feel free to use them in your own apps. More macros could be added in the future.

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

[](#installation)

You can install the package via composer:

```
composer require gnahotelsolutions/laravel-eloquent-macros
```

Usage
-----

[](#usage)

```
// Usage description here
```

### 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)

- [David Llop](https://github.com/lloople)
- [Waska Chaduneli](https://github.com/laravel/ideas/issues/708#issuecomment-613343926)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

Laravel Package Boilerplate
---------------------------

[](#laravel-package-boilerplate)

This package was generated using the [Laravel Package Boilerplate](https://laravelpackageboilerplate.com).

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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

Every ~511 days

Total

2

Last Release

1391d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/777a92668f51536d86a9fed19c92180d626b46f134b002c3a068e92d295c7541?d=identicon)[lloople](/maintainers/lloople)

---

Top Contributors

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

---

Tags

laravelpackagegnahotelsolutionslaravel-eloquent-macros

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[illuminate/pipeline

The Illuminate Pipeline package.

9446.6M213](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10532.5M862](/packages/illuminate-pagination)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[spatie/laravel-mix-preload

Add preload and prefetch links based your Mix manifest

169176.0k2](/packages/spatie-laravel-mix-preload)[mrmarchone/laravel-auto-crud

Laravel Auto CRUD helps you streamline development and save time.

28711.8k2](/packages/mrmarchone-laravel-auto-crud)

PHPackages © 2026

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