PHPackages                             jarivas/laravel-cast-json-models - 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. jarivas/laravel-cast-json-models

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

jarivas/laravel-cast-json-models
================================

A simple and direct way of casting json objects to models

1.3.0(6mo ago)0125↓50%GPL-3.0-or-laterPHP

Since Oct 7Pushed 4mo agoCompare

[ Source](https://github.com/jarivas/laravel-cast-json-models)[ Packagist](https://packagist.org/packages/jarivas/laravel-cast-json-models)[ RSS](/packages/jarivas-laravel-cast-json-models/feed)WikiDiscussions main Synced 1mo ago

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

Laravel json casting
====================

[](#laravel-json-casting)

- A easy solution to have decriptions of json objects POCO style
- The method **Object::collection** will convert an array of objects to an collection of PHP objects that extends from CastModels\\Model
- The objects that extends from CastModels\\Model has the method **toArray** so can be returned in a response directly
- self casts from a Json object or array of json objects

```
