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