PHPackages                             ironshark/laravel-extendable - 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. [Database &amp; ORM](/categories/database)
4. /
5. ironshark/laravel-extendable

ActiveLibrary[Database &amp; ORM](/categories/database)

ironshark/laravel-extendable
============================

Traits for Laravel to add and manage custom Eloquent model fields.

v1.0.10(9y ago)2411.0k6[1 issues](https://github.com/ironsharkde/laravel-extendable/issues)MITPHPPHP &gt;=5.3.0

Since Jul 24Pushed 9y ago10 watchersCompare

[ Source](https://github.com/ironsharkde/laravel-extendable)[ Packagist](https://packagist.org/packages/ironshark/laravel-extendable)[ RSS](/packages/ironshark-laravel-extendable/feed)WikiDiscussions master Synced 1mo ago

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

Laravel Extendable package
==========================

[](#laravel-extendable-package)

[![License](https://camo.githubusercontent.com/56a2ccab54021a2a2e11e3f322d825e6d8cc397225607f43f8b7a5e691745c94/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f69726f6e736861726b64652f6c61726176656c2d657874656e6461626c652e737667)](https://packagist.org/packages/ironshark/laravel-extendable)[![Downloads](https://camo.githubusercontent.com/0a3fa097ade0f5e0b6714392901bfcf4e93a16b52698c170a13de54538f7eea4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f69726f6e736861726b2f6c61726176656c2d657874656e6461626c652e737667)](https://packagist.org/packages/ironshark/laravel-extendable)[![Version-stable](https://camo.githubusercontent.com/1bf3f601d42c673e0361e63bdd90512d5801bef2f8f78422c818537015e12cca/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f69726f6e736861726b2f6c61726176656c2d657874656e6461626c652e737667)](https://packagist.org/packages/ironshark/laravel-extendable)

How to install
--------------

[](#how-to-install)

### Composer Install

[](#composer-install)

```
composer require ironshark/laravel-extendable
```

### Laravel Service Provider

[](#laravel-service-provider)

Add service provider in `app/config/app.php`

```
'providers' => [
    IronShark\Extendable\ExtendableServiceProvider::class,
];
```

Publish configs, templates and run migrations.

```
php artisan vendor:publish --provider="IronShark\Extendable\ExtendableServiceProvider"
php artisan migrate
```

Usage
-----

[](#usage)

### Add traits

[](#add-traits)

Add model trait to models, where you want to use custom fields.

```
class Article extends \Illuminate\Database\Eloquent\Model {
    use IronShark\Extendable\ModelTrait;
}
```

### Config fields

[](#config-fields)

Use `app/config/custom-fields.php` to configure your fields.

```
return [
    'App\Room' => [                                                     // model name
        'light' => [                                                    // field name
            'title' => 'Light',                                         // field title (can be used in views)
            'type' => \IronShark\Extendable\CustomFieldType::Radio,     // field type
            'options' => [                                              // possible values/labels
                0 => 'Off',
                1 => 'On'
            ],
            'default' => 1                                              // default value
        ]
    ]
];
```

### Assign/retrieve customfield values

[](#assignretrieve-customfield-values)

Assign custom field values as regular values.

```
$data = [
    'title' => 'Awesome Article!!!', // regular field
    'recomended' => 1                // custom filed
];

$article = new Article();
$article->fill($data);
$article->save();
```

Retrieve custom field values.

```
$article = Article::find(1);
$article->recomended->value; // 1
echo $article->recomended;   // 1
```

### Field types

[](#field-types)

FieldTypeDB DataTypeExampleCustomFieldType::StringVARCHAR(255)`Lorem`CustomFieldType::TextTEXT`Lorem Ipsum...`CustomFieldType::SelectVARCHAR(255)`en_us`CustomFieldType::RadioVARCHAR(255)`off`CustomFieldType::CheckboxVARCHAR(255)`0`CustomFieldType::DateTimeTIMESTAMP`2015-01-19 03:14:07`

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 93.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 ~29 days

Recently: every ~76 days

Total

13

Last Release

3590d ago

Major Versions

v0.0.0 → v1.0.02015-07-30

v0.0.1 → v1.0.22015-07-30

### Community

Maintainers

![](https://www.gravatar.com/avatar/21e9b7ea17d986bae709d9ce167df6df4df854f742bc76097139af77e4e9a34b?d=identicon)[TUNER88](/maintainers/TUNER88)

---

Top Contributors

[![TUNER88](https://avatars.githubusercontent.com/u/1565397?v=4)](https://github.com/TUNER88 "TUNER88 (31 commits)")[![chrizz1001](https://avatars.githubusercontent.com/u/260550?v=4)](https://github.com/chrizz1001 "chrizz1001 (1 commits)")[![d-a-n](https://avatars.githubusercontent.com/u/1060397?v=4)](https://github.com/d-a-n "d-a-n (1 commits)")

---

Tags

laraveleloquenttraitcustom fieldsextendable

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ironshark-laravel-extendable/health.svg)

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

###  Alternatives

[cybercog/laravel-love

Make Laravel Eloquent models reactable with any type of emotions in a minutes!

1.2k302.7k1](/packages/cybercog-laravel-love)[rtconner/laravel-likeable

Trait for Laravel Eloquent models to allow easy implementation of a 'like' or 'favorite' or 'remember' feature.

394388.0k5](/packages/rtconner-laravel-likeable)[relaticle/custom-fields

User Defined Custom Fields for Laravel Filament

15828.6k](/packages/relaticle-custom-fields)[cybercog/laravel-nova-ban

A Laravel Nova banning functionality for your application.

40199.8k](/packages/cybercog-laravel-nova-ban)[pawelmysior/laravel-publishable

Toggle the published state of your Eloquent models easily

2219.1k3](/packages/pawelmysior-laravel-publishable)[onramplab/laravel-custom-fields

An laravel package that enables custom field support for any Laravel models

103.9k](/packages/onramplab-laravel-custom-fields)

PHPackages © 2026

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