Reference

PHP attributes

The attributes read on resources and models.
AttributeOnEffect
#[Ark4ne\JsonApi\Resources\Attributes\JsonApiType('posts')]a resourceIts type, without toType()
#[Ark4ne\JsonApi\Resources\Attributes\JsonApiModel(Post::class)]a resourceIts model, to guess the resources of its relationships (default: the naming convention)
#[Ark4ne\JsonApi\Resources\Attributes\JsonApiRoutes(self: 'posts.show', relationship: …, related: …)]a resourceLinks from routes, see Links by route
#[Ark4ne\JsonApi\Definition\JsonApiSince(ApiRevision::X)]a resourceThe resource exists from the revision included; not inherited
#[Ark4ne\JsonApi\Definition\JsonApiUntil(ApiRevision::X)]a resourceThe resource exists up to the revision included; not inherited
#[Illuminate\Database\Eloquent\Attributes\UseResource(UserResource::class)]a modelThe resource of the model when a relationship is guessed