PHPackages                             ivanomatteo/laravel-model-utils - 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. ivanomatteo/laravel-model-utils

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

ivanomatteo/laravel-model-utils
===============================

Extract info from models

0.4.3(4y ago)539[3 PRs](https://github.com/ivanomatteo/laravel-model-utils/pulls)MITPHPPHP ^8.0

Since Jun 12Pushed 2y ago2 watchersCompare

[ Source](https://github.com/ivanomatteo/laravel-model-utils)[ Packagist](https://packagist.org/packages/ivanomatteo/laravel-model-utils)[ Docs](https://github.com/ivanomatteo/model-utils)[ GitHub Sponsors](https://github.com/ivanomatteo)[ RSS](/packages/ivanomatteo-laravel-model-utils/feed)WikiDiscussions master Synced 1mo ago

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

Extract attributes metadata from model
======================================

[](#extract-attributes-metadata-from-model)

[![Latest Version on Packagist](https://camo.githubusercontent.com/3dd1382aa20b05df3a2822c5a3561f4086db9c9f90bfac4be054fcf0a23a9390/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6976616e6f6d617474656f2f6c61726176656c2d6d6f64656c2d7574696c732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ivanomatteo/laravel-model-utils)[![GitHub Tests Action Status](https://camo.githubusercontent.com/f410c9a623b7a0a48ea2d80f1c5240c6028d2c6e7ed3b9a64cd4c14a819b18b0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6976616e6f6d617474656f2f6c61726176656c2d6d6f64656c2d7574696c732f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/ivanomatteo/laravel-model-utils/actions?query=workflow%3Arun-tests+branch%3Amaster)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/a9e65765cb414e40387beef06b5f4fc1fa27f83a33186f61e48c2452ab167ec8/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6976616e6f6d617474656f2f6c61726176656c2d6d6f64656c2d7574696c732f436865636b253230262532306669782532307374796c696e673f6c6162656c3d636f64652532307374796c65)](https://github.com/ivanomatteo/laravel-model-utils/actions?query=workflow%3A%22Check+%26+fix+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/72c4e6ef77c1a0ed9c5f2581a5dbb2f7591c808839a5081a658bc7db4a8a82d3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6976616e6f6d617474656f2f6c61726176656c2d6d6f64656c2d7574696c732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ivanomatteo/laravel-model-utils)

This package provide a simple way to retrive usefull metadata from laravel models

- find all models inside a psr-4 directory structure
- retrieve all columns and metadata from database
- retrieve indexes metadata
- generate basic validation rules using metadata
- model type hinting removed, you can use

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

[](#installation)

You can install the package via composer:

```
composer require ivanomatteo/laravel-model-utils
```

Usage
-----

[](#usage)

```
use IvanoMatteo\ModelUtils\ModelUtils;

dump(ModelUtils::findModels());

$mu = new ModelUtils(\App\User::class);

dump('id visible:',$mu->isVisible('id'));
dump('password visible:',$mu->isVisible('password'));

dump($mu->getValidationRules());
dump($mu->getValidationRules(true)); //also for not fillable fields

dump($mu->getMetadata());
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

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

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

[](#contributing)

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

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

[](#security-vulnerabilities)

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

Credits
-------

[](#credits)

- [Ivano Matteo](https://github.com/ivanomatteo)
- Thanks also to [Barry vd. Heuvel](https://github.com/barryvdh) for his libraries, i took some pices of code from ide helper
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 69.3% 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 ~69 days

Recently: every ~115 days

Total

11

Last Release

1463d ago

PHP version history (3 changes)0.1.0PHP ^7.1

0.3.0PHP ^7.1 || ^8.0

0.4.0PHP ^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/35255310?v=4)[Ivano Matteo](/maintainers/IvanoMatteo)[@ivanomatteo](https://github.com/ivanomatteo)

---

Top Contributors

[![ivanomatteo](https://avatars.githubusercontent.com/u/35255310?v=4)](https://github.com/ivanomatteo "ivanomatteo (52 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] (11 commits)")

---

Tags

laravelivanomatteomodel-utils

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/ivanomatteo-laravel-model-utils/health.svg)

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

###  Alternatives

[spatie/laravel-data

Create unified resources and data transfer objects

1.7k28.9M627](/packages/spatie-laravel-data)[spatie/laravel-livewire-wizard

Build wizards using Livewire

4061.0M4](/packages/spatie-laravel-livewire-wizard)[hirethunk/verbs

An event sourcing package that feels nice.

513162.9k6](/packages/hirethunk-verbs)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

123544.7k](/packages/worksome-exchange)[ralphjsmit/livewire-urls

Get the previous and current url in Livewire.

82270.3k4](/packages/ralphjsmit-livewire-urls)[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)

PHPackages © 2026

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