PHPackages                             michael-rubel/laravel-model-mapper - 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. michael-rubel/laravel-model-mapper

Abandoned → [michael-rubel/laravel-loop-functions](/?search=michael-rubel%2Flaravel-loop-functions)ArchivedLibrary[Utility &amp; Helpers](/categories/utility)

michael-rubel/laravel-model-mapper
==================================

Collection of functions to loop over your data.

3.4.3(3y ago)174512MITPHPPHP ^8.0

Since Feb 16Pushed 2y ago1 watchersCompare

[ Source](https://github.com/michael-rubel/laravel-loop-functions)[ Packagist](https://packagist.org/packages/michael-rubel/laravel-model-mapper)[ Docs](https://github.com/michael-rubel/laravel-loop-functions)[ Fund](https://paypal.me/observername)[ RSS](/packages/michael-rubel-laravel-model-mapper/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (10)Dependencies (10)Versions (21)Used By (0)

[![Laravel Loop Functions](https://user-images.githubusercontent.com/37669560/197970105-a3ea9090-ebae-495b-ac13-729b0565d75a.png)](https://user-images.githubusercontent.com/37669560/197970105-a3ea9090-ebae-495b-ac13-729b0565d75a.png)

Laravel Loop Functions
======================

[](#laravel-loop-functions)

[![Latest Version on Packagist](https://camo.githubusercontent.com/b5e50b8567514a9f9e913f850f0c38d0bf87d557f25ba313497151f26a7b94f2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d69636861656c2d727562656c2f6c61726176656c2d6c6f6f702d66756e6374696f6e732e7376673f7374796c653d666c61742d737175617265266c6f676f3d7061636b6167697374)](https://packagist.org/packages/michael-rubel/laravel-loop-functions)[![Total Downloads](https://camo.githubusercontent.com/9ba3327009206ddde0b786e8c0d36182462a3fb52d200297937b9c314f1bfdad/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d69636861656c2d727562656c2f6c61726176656c2d6c6f6f702d66756e6374696f6e732e7376673f7374796c653d666c61742d737175617265266c6f676f3d7061636b6167697374)](https://packagist.org/packages/michael-rubel/laravel-loop-functions)[![Code Quality](https://camo.githubusercontent.com/80d5987f19608b4ccc681be4fe7f579bb4d0db223f4639411b4db2ff348f5882/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f7175616c6974792f672f6d69636861656c2d727562656c2f6c61726176656c2d6c6f6f702d66756e6374696f6e732e7376673f7374796c653d666c61742d737175617265266c6f676f3d7363727574696e697a6572)](https://scrutinizer-ci.com/g/michael-rubel/laravel-loop-functions/?branch=main)[![Code Coverage](https://camo.githubusercontent.com/01de86fa9ec607afd2b9d28688590f91b3a4803292afea51787bfb2b2024cd41/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6d69636861656c2d727562656c2f6c61726176656c2d6c6f6f702d66756e6374696f6e732e7376673f7374796c653d666c61742d737175617265266c6f676f3d7363727574696e697a6572)](https://scrutinizer-ci.com/g/michael-rubel/laravel-loop-functions/?branch=main)[![GitHub Tests Action Status](https://camo.githubusercontent.com/e5b6b40dbbc6c2565fa616d66ffee77c5a5d9f2f61df3c30205947e7353de565/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6d69636861656c2d727562656c2f6c61726176656c2d6c6f6f702d66756e6374696f6e732f72756e2d74657374732e796d6c3f6272616e63683d6d61696e267374796c653d666c61742d737175617265266c6162656c3d7465737473266c6f676f3d676974687562)](https://github.com/michael-rubel/laravel-loop-functions/actions)[![PHPStan](https://camo.githubusercontent.com/1e91e88f0ef7298ef4099a704971f6b942b958f216031a0027eec0a99ef8f25c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6d69636861656c2d727562656c2f6c61726176656c2d6c6f6f702d66756e6374696f6e732f7068707374616e2e796d6c3f6272616e63683d6d61696e267374796c653d666c61742d737175617265266c6162656c3d6c6172617374616e266c6f676f3d6c61726176656c)](https://github.com/michael-rubel/laravel-loop-functions/actions)

The package provides the collection of methods to loop over your data.

The package requires `PHP 8` or higher and `Laravel 9` or higher.

\#StandWithUkraine
------------------

[](#standwithukraine)

[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://github.com/vshymanskyy/StandWithUkraine/blob/main/docs/README.md)

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

[](#installation)

Install the package using composer:

```
composer require michael-rubel/laravel-loop-functions
```

Usage
-----

[](#usage)

```
use LoopFunctions;
```

#### Assign Eloquent model attributes to class properties:

[](#assign-eloquent-model-attributes-to-class-properties)

```
$this->propertiesFrom($model);
```

#### Assign array key values to class properties:

[](#assign-array-key-values-to-class-properties)

```
$this->propertiesFrom($array);
```

If you want to use dynamic properties, adjust the `dynamic_properties` key in the config and add the following trait if your class is not already implementing the `get/set` magic methods:

```
use WithDynamicProperties;
```

`Note: if you use the Livewire components, it already has similar definitions under the hood.`

#### Dump class properties:

[](#dump-class-properties)

```
$this->dumpProperties();
```

Ignored property names
----------------------

[](#ignored-property-names)

By default, the package ignores `id` and `password` properties to avoid conflicts in Livewire/auth components. You can customize the ignore list by editing the config.

```
php artisan vendor:publish --tag="loop-functions-config"
```

Logging
-------

[](#logging)

The functions don't throw an exception in case of failed assignment (e.g. type incompatibility) but log such an event. You can disable exception logging if you wish so in the config.

Testing
-------

[](#testing)

```
composer test
```

License
-------

[](#license)

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

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity64

Established project with proven stability

 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 ~24 days

Recently: every ~72 days

Total

15

Last Release

1260d ago

Major Versions

1.0.0 → 2.0.02022-02-16

2.1.0 → 3.0.02022-03-29

PHP version history (2 changes)1.0.0PHP ^8.0|^8.1

3.4.3PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/9c060c69332d50a7cb290529ad84a7f216dec94d59950db7446dc93208787083?d=identicon)[michael-rubel](/maintainers/michael-rubel)

---

Top Contributors

[![michael-rubel](https://avatars.githubusercontent.com/u/37669560?v=4)](https://github.com/michael-rubel "michael-rubel (110 commits)")

---

Tags

helper-functionslaravellooking-for-contributorsphplaravelmichael-rubellaravel-loop-functions

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/michael-rubel-laravel-model-mapper/health.svg)

```
[![Health](https://phpackages.com/badges/michael-rubel-laravel-model-mapper/health.svg)](https://phpackages.com/packages/michael-rubel-laravel-model-mapper)
```

###  Alternatives

[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M46](/packages/spatie-laravel-pdf)[codewithdennis/filament-select-tree

The multi-level select field enables you to make single selections from a predefined list of options that are organized into multiple levels or depths.

329530.5k29](/packages/codewithdennis-filament-select-tree)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

124603.0k](/packages/worksome-exchange)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)[stephenjude/laravel-wallet

A simple wallet implementation for Laravel

26611.9k](/packages/stephenjude-laravel-wallet)[tarfin-labs/event-machine

Event-driven state machines for Laravel with event sourcing, type-safe context, and full audit trail.

199.4k](/packages/tarfin-labs-event-machine)

PHPackages © 2026

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