Schema
trait implement methodschema
onJsonApiResource
andJsonApiCollection
Relationize::relationship
static method which allow to create relation for resource (like :PostResource::relationship(fn() => $this->posts)
)
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 overwritedtoAttributes
SHOULD return anarray<string, Closure>
toRelationships
MUST return anarray<string, Relationship>
-
JsonApiCollection
construct
can't be overwrited
-
Resourceable
toArray
second parameter has been changed fromfalse
totrue
, and comportment has been inverted.
-
Relationize
asRelationship
has been deleted