You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 :
publicfunction __construct(
protectedstring$resource, // represent class-string of resource protectedClosure$value, // MUST be a closure which return real valueprotected ?Closure$links = null,
protected ?Closure$meta = null
)
JsonApiResource
construct can't be overwrited
toAttributesSHOULD return an array<string, Closure>
toRelationshipsMUST 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.