class ApiResource implements ExtenderInterface
Methods
Add endpoints to the resource before a certain endpoint.
Add endpoints to the resource after a certain endpoint.
Add endpoints to the resource before all other endpoints.
Remove endpoints from the resource.
Modify an endpoint.
Add fields to the resource before a certain field.
Add fields to the resource after a certain field.
Remove fields from the resource.
Remove sorts from the resource.
Details
at
line 38
__construct(string $resourceClass)
at
line 53
ApiResource
endpoints(callable|string $endpoints)
Add endpoints to the resource.
at
line 66
ApiResource
endpointsBefore(string $before, callable|string $endpoints)
Add endpoints to the resource before a certain endpoint.
at
line 79
ApiResource
endpointsAfter(string $after, callable|string $endpoints)
Add endpoints to the resource after a certain endpoint.
at
line 91
ApiResource
endpointsBeforeAll(callable|string $endpoints)
Add endpoints to the resource before all other endpoints.
at
line 104
ApiResource
removeEndpoints(array $endpoints, callable|string|null $condition = null)
Remove endpoints from the resource.
at
line 117
ApiResource
endpoint(string|array $endpointNameOrClass, callable|string $mutator)
Modify an endpoint.
at
line 131
ApiResource
fields(callable|string $fields)
Add fields to the resource.
at
line 144
ApiResource
fieldsBefore(string $before, callable|string $fields)
Add fields to the resource before a certain field.
at
line 157
ApiResource
fieldsAfter(string $after, callable|string $fields)
Add fields to the resource after a certain field.
at
line 170
ApiResource
removeFields(array $fields, callable|string|null $condition = null)
Remove fields from the resource.
at
line 183
ApiResource
field(string|array $field, callable|string $mutator)
Modify a field.
at
line 197
ApiResource
sorts(callable|string $sorts)
Add sorts to the resource.
at
line 210
ApiResource
removeSorts(array $sorts, callable|string|null $condition = null)
Remove sorts from the resource.
at
line 223
ApiResource
sort(string|array $sort, callable|string $mutator)
Modify a sort.