PHPackages                             laravel-enso/nullablefields - 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. laravel-enso/nullablefields

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

laravel-enso/nullablefields
===========================

Trait for nullable fields

1.0.5(9y ago)0117MITPHPPHP &gt;=5.6.4

Since Mar 21Pushed 9y ago2 watchersCompare

[ Source](https://github.com/laravel-enso/NullableFields)[ Packagist](https://packagist.org/packages/laravel-enso/nullablefields)[ RSS](/packages/laravel-enso-nullablefields/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (1)Versions (6)Used By (0)

NullableFileds
==============

[](#nullablefileds)

[![Codacy Badge](https://camo.githubusercontent.com/d4e9cf49edd1449afbb1c07c8f41ba379444974cdc8033c05e494b44d9ba7acf/68747470733a2f2f6170692e636f646163792e636f6d2f70726f6a6563742f62616467652f47726164652f3932313039623033393939363464323162396561346439353061376363343062)](https://www.codacy.com/app/laravel-enso/NullableFields?utm_source=github.com&utm_medium=referral&utm_content=laravel-enso/NullableFields&utm_campaign=badger)[![StyleCI](https://camo.githubusercontent.com/a4213ae0cd2c29507ea05a7038ece5e24565c9eae5301bfcd75bac987c57dec0/68747470733a2f2f7374796c6563692e696f2f7265706f732f38353731323631302f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/85712610)[![Total Downloads](https://camo.githubusercontent.com/c54eec93c69ce6b162702dbd753f7d07ddd5c2dc072da58e78b2277974bb7f55/68747470733a2f2f706f7365722e707567782e6f72672f6c61726176656c2d656e736f2f6e756c6c61626c656669656c64732f646f776e6c6f616473)](https://packagist.org/packages/laravel-enso/nullablefields)[![Latest Stable Version](https://camo.githubusercontent.com/c330285b1630e86ccc8a289c2abd404249c47a07e6defe52c1f6032fca55bc3c/68747470733a2f2f706f7365722e707567782e6f72672f6c61726176656c2d656e736f2f6e756c6c61626c656669656c64732f76657273696f6e)](https://packagist.org/packages/laravel-enso/nullablefields)

Trait for nullable fields heavily inspired from michaeldyrynda/laravel-nullable-fields package. Usefull only with Laravel &lt;= 5.3. L5.4 comes with `TrimStrings` and `ConvertEmptyStringsToNull` by default.

### Use

[](#use)

1. In the Model where you want empty strings to be set to null add

```
use LaravelEnso\NullableFileds\app\Traits\NullableFileds

```

then set the attribute that shold be transformed:

```
protected $nullableFields = ['attribute', ...]

```

### Note

[](#note)

The laravel-enso/core package comes with this library included.

###  Health Score

28

—

LowBetter than 51% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 90.9% 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 ~20 days

Total

5

Last Release

3350d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/16073274?v=4)[Adrian Ocneanu](/maintainers/aocneanu)[@aocneanu](https://github.com/aocneanu)

---

Top Contributors

[![aocneanu](https://avatars.githubusercontent.com/u/16073274?v=4)](https://github.com/aocneanu "aocneanu (10 commits)")[![codacy-badger](https://avatars.githubusercontent.com/u/23704769?v=4)](https://github.com/codacy-badger "codacy-badger (1 commits)")

---

Tags

laravellaravel-ensolaravel-packagetrait

### Embed Badge

![Health badge](/badges/laravel-enso-nullablefields/health.svg)

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

###  Alternatives

[crumbls/layup

A visual page builder plugin for Filament 5 — Divi-style grid layouts with extensible widgets.

604.0k2](/packages/crumbls-layup)[duncanmcclean/statamic-cargo

Comprehensive e-commerce addon for Statamic. Build bespoke e-commerce sites without the complexity.

3622.8k](/packages/duncanmcclean-statamic-cargo)[team-nifty-gmbh/tall-datatables

Server-side rendered datatables for Laravel and Livewire

1422.0k5](/packages/team-nifty-gmbh-tall-datatables)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

119.8k](/packages/tomshaw-electricgrid)

PHPackages © 2026

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