Skip to content

Releases: Ark4ne/laravel-json-api

v1.0.2

21 Apr 16:12
Compare
Choose a tag to compare

Full Changelog: v1.0.1...v1.0.2

v1.0.1

21 Apr 15:29
Compare
Choose a tag to compare

Full Changelog: v1.0.0...v1.0.1

v1.0.0

21 Apr 13:47
Compare
Choose a tag to compare

Release note

v1.0.0

Added

  • Schema trait implement method schema on JsonApiResource and JsonApiCollection
  • Relationize::relationship static method which allow to create relation for resource (like : PostResource::relationship(fn() => $this->posts))

Breaking change

  • Relationship::construct signature has change for :
public function __construct(
  protected string $resource, // represent class-string of resource  
  protected Closure $value,   // MUST be a closure which return real value
  protected ?Closure $links = null,
  protected ?Closure $meta = null
)
  • JsonApiResource

    • construct can't be overwrited
    • toAttributes SHOULD return an array<string, Closure>
    • toRelationships MUST return an array<string, Relationship>
  • JsonApiCollection

    • construct can't be overwrited
  • Resourceable

    • toArray second parameter has been changed from false to true, and comportment has been inverted.
  • Relationize

    • asRelationship has been deleted

v0.0.1

14 Apr 13:54
Compare
Choose a tag to compare
test: whenIncluded

v0.0.0

13 Apr 14:54
Compare
Choose a tag to compare
test: collection (basic)

v0.0.0-RC1

12 Apr 12:26
Compare
Choose a tag to compare
v0.0.0-RC1 Pre-release
Pre-release
test: fix stub for php8.0