PHPackages                             abbasghasemi/easy-data-model - 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. abbasghasemi/easy-data-model

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

abbasghasemi/easy-data-model
============================

Creates a data model from array data.

1.2(8mo ago)029MITPHPPHP ^8.1

Since Oct 26Pushed 8mo ago1 watchersCompare

[ Source](https://github.com/abbasghasemi/easy-data-model)[ Packagist](https://packagist.org/packages/abbasghasemi/easy-data-model)[ RSS](/packages/abbasghasemi-easy-data-model/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (9)Dependencies (1)Versions (10)Used By (0)

abbasghasemi/easy-data-model
============================

[](#abbasghasemieasy-data-model)

abbasghasemi/easy-data-model is a PHP library for easy data model creation and control.

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

[](#installation)

The preferred method of installation is via [Composer](https://getcomposer.org). Run the following command to install the package and add it as a requirement to your project's `composer.json`:

```
composer require abbasghasemi/easy-data-model
```

Description
-----------

[](#description)

- Complete tools for modeling and validate inputs
- Helps in building APIs
- Can also simplify working with values &amp; database in PHP
- Support the [Collection library](https://github.com/abbasghasemi/collection)
- See [Safe annotation](https://github.com/abbasghasemi/easy-data-model/blob/master/src/Safe.php)
- See [Ignore annotation](https://github.com/abbasghasemi/easy-data-model/blob/master/src/Ignore.php)
- See [PropertyNullable](https://github.com/abbasghasemi/easy-data-model/blob/master/src/PropertyNullable.php)
- See [ValueConvertor](https://github.com/abbasghasemi/easy-data-model/blob/master/src/ValueConvertor.php)
- See [FinallyAssert](https://github.com/abbasghasemi/easy-data-model/blob/master/src/FinallyAssert.php)
- Use `ModelBuilder::fromArray(array $data,string objectOrClass);`

Example
-------

[](#example)

```
