class ApiSerializer implements ExtenderInterface
Methods
Add a single attribute to this serializer.
Add to or modify the attributes array of this serializer.
Establish a simple hasOne relationship from this serializer to another serializer.
Establish a simple hasMany relationship from this serializer to another serializer.
Add a relationship from this serializer to another serializer.
Details
at
line 28
__construct(string $serializerClass)
at
line 49
ApiSerializer
attribute(string $name, callable|string $callback)
Add a single attribute to this serializer.
at
line 72
ApiSerializer
attributes(callable|string $callback)
Add to or modify the attributes array of this serializer.
at
line 89
ApiSerializer
hasOne(string $name, string $serializerClass)
Establish a simple hasOne relationship from this serializer to another serializer.
This represents a one-to-one relationship.
at
line 106
ApiSerializer
hasMany(string $name, string $serializerClass)
Establish a simple hasMany relationship from this serializer to another serializer.
This represents a one-to-many relationship.
at
line 129
ApiSerializer
relationship(string $name, callable|string $callback)
Add a relationship from this serializer to another serializer.