class ApiSerializer implements ExtenderInterface
Methods
Add to or modify the attributes array of 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 47
ApiSerializer
attribute(string $name, $callback)
at
line 70
ApiSerializer
attributes(callable|string $callback)
Add to or modify the attributes array of this serializer.
at
line 94
ApiSerializer
mutate(callable|string $callback)
deprecated
deprecated
Add to or modify the attributes array of this serializer.
at
line 109
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 126
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 149
ApiSerializer
relationship(string $name, $callback)
Add a relationship from this serializer to another serializer.