A PHP package for mapping remote {json:api} resources to Eloquent like models and collections.
Repository
is split up into one trait per action #91. This allows you to build your own repository by extending the BaseRepository
and including just the actions/traits you need. See the (updated) readme for usage instructions. The Repository
now uses these new traits and should be fully backwards compatible.Please also check the changes in 2.0.0-beta and see UPGRADING for details on how to upgrade.
json_encode
and json_decode
) will throw JsonExceptions on error #94.Please see UPGRADING for details on how to upgrade.
Item::mergeAppends
, Item::mergeCasts
, Item::mergeFillable
and Item::mergeGuarded
.Item::addHidden
to Item::makeHidden
.Item::addVisible
and Item::withHidden
into Item::makeVisible
.Item::getAttributeValue
to public.toArray
method will now cast any attributes that implement Illuminate\Contracts\Support\Arrayable
to an array.newInstance
method will now copy the type of the original item.jenssegers/model
dependency and added the classes into the package.$item['attributes']
).