PHPackages                             paulvl/magicmodel - 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. paulvl/magicmodel

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

paulvl/magicmodel
=================

Eloquent's extended Model with extra features.

1.0.0(11y ago)031MITPHPPHP &gt;=5.4.0

Since Feb 13Pushed 11y ago1 watchersCompare

[ Source](https://github.com/paulvl/MagicModel)[ Packagist](https://packagist.org/packages/paulvl/magicmodel)[ RSS](/packages/paulvl-magicmodel/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

**MagicModel**
==============

[](#magicmodel)

This Laravel package provides extended functions for Eloquent.

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

[](#installation)

### Laravel 4.2

[](#laravel-42)

1. Begin by installing this package through Composer. Edit your project's `composer.json` file to require `paulvl/magicmodel`.

    ```
     "require-dev": {
     	"paulvl/magicmodel": "dev-master"
     }

    ```

    > There is no support for Laravel 5.
2. Next, update Composer from the Terminal:

    ```
     composer update --dev

    ```
3. Once this operation completes, add the service provider. Open `app/config/app.php`, and add a new item to the providers array.

    ```
     'PaulVL\MagicModel\MagicModelServiceProvider'

    ```
4. And add a new item to the aliases array, on same `app/config/app.php` file.

    ```
     'MagicModel' => 'PaulVL\MagicModel\MagicModel'

    ```
5. Finally in order to use **MagicModel** properly you have to extend your **"Model"** from **MagicModel** instead of **Eloquent** like this for example:

    ```
