PHPackages                             prewk/record - 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. prewk/record

ActiveLibrary

prewk/record
============

Immutable validatable record

2.1.1(8y ago)33.9k[1 issues](https://github.com/prewk/record/issues)MITPHPPHP &gt;=7.0

Since Apr 6Pushed 8y ago1 watchersCompare

[ Source](https://github.com/prewk/record)[ Packagist](https://packagist.org/packages/prewk/record)[ Docs](http://github.com/prewk/record)[ RSS](/packages/prewk-record/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (2)Versions (21)Used By (0)

Immutable Validatable Record [![Build Status](https://camo.githubusercontent.com/bd23052f5acc604d7e57546d56bfa2074deb684b13aae17d3ab9f32007a58344/68747470733a2f2f7472617669732d63692e6f72672f707265776b2f7265636f72642e737667)](https://travis-ci.org/prewk/record) [![Coverage Status](https://camo.githubusercontent.com/3eff0e611a6b7440612aa8bfa8becb76d65742569742ee60c9c0f57d17604177/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f707265776b2f7265636f72642f62616467652e7376673f6272616e63683d6d617374657226)](https://coveralls.io/github/prewk/record?branch=master)
=====================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#immutable-validatable-record--)

Validatable records with an API inspired by [Immutable Record](http://facebook.github.io/immutable-js/docs/#/Record) (but without the memory efficiency..)

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

[](#installation)

`composer require prewk/record`

Simple usage
------------

[](#simple-usage)

1. Extend `\Prewk\Record`
2. Define fields by implementing `getFields()`
3. Define (optional) defaults by implementing `getDefaults()`
4. Construct a base record
5. Create new records from that base record

```
