New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

joemugen/eloquenty-model

A Laravel eloquent-like model class, for Laravel and other frameworks
3,751

Larablocks Analysis

joemugen/eloquenty-model works with Laravel 7, 8 and 9 (latest release 1.1.0, Aug 17, 2022), all past end of life (the last on Feb 6, 2024): no more fixes, even for security.

Recommendation checks

Not advised

Not advised: no release or commit in over 2 years.

  • No release or commit in over 2 years
  • Supports only Laravel 7, 8 and 9, past end of life since Feb 6, 2024
  • No release in the last 12 months (last: Aug 17, 2022)
  • 0 downloads a month (needs 10,000)
  • 0 GitHub stars (needs 100)

State

Likely abandoned
  • No release or commit in over 2 years.
  • Last stable release: Aug 17, 2022.
  • No releases in the last 12 months.
  • First released: Dec 23, 2021.
  • 0 open issues on GitHub.

Data from Packagist and GitHub, checked by Larablocks on Nov 29, 2026.

Install
composer require joemugen/eloquenty-model
Latest Version:1.1.0
PHP:^8.0|^8.1
Laravel:7 · 8 · 9
License:MIT
Last Updated:Aug 17, 2022
Links: GitHub  ·  Packagist
Maintainer: joemugen

Model

This model provides a Laravel eloquent-like base class that can be used to build custom models in Laravel or other frameworks.

Features

  • Accessors and mutators
  • Model to Array and JSON conversion
  • Hidden attributes in Array/JSON conversion
  • Guarded and fillable attributes
  • Appending accessors and mutators to Array/JSON conversion
  • Attribute casting

You can read more about these features and the original Eloquent model on http://laravel.com/docs/eloquent

Installation

Install using composer:

composer require joemugen/eloquenty-model

Example


use JoeMugen\EloquentyModel\Model;

class User extends Model {
    protected $hidden = ['password'];
    protected $guarded = ['password'];
    protected $casts = ['age' => 'integer'];

    public function save()
    {
        return API::post('/items', $this->attributes);
    }

    public function setBirthdayAttribute($value)
    {
        $this->attributes['birthday'] = strtotime($value);
    }

    public function getBirthdayAttribute($value)
    {
        return new DateTime("@$value");
    }

    public function getAgeAttribute($value)
    {
        return $this->birthday->diff(new DateTime('now'))->y;
    }
}

$item = new User(['name' => 'John']);
$item->password = 'secret';

echo $item; // {"name":"John"}

Related Packages

jenssegers/model

An Laravel eloquent-like model class, for Laravel and other frameworks

4,816,176 393
cerbero/eloquent-inspector

Inspect Laravel Eloquent models to collect properties, relationships and more.

57,468 112
czim/laravel-nestedupdater

Eloquent model updater for nested relations data for Laravel.

54,483 19
custom-d/eloquent-model-encrypt

A eloquent model encrypt

6,242
czim/laravel-modelcomparer

Performs a deep-nested comparison of a model's before/after state.

4,738 2

Version History

Version Released PHP Laravel License
1.1.0 ^8.0|^8.1 ^7.0|^8.0|^9.0 MIT
1.0.0 ^8.0 ^7.0|^8.0 MIT