Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Collection ¶
Collection maps a slice of resources to JSON.
Types ¶
type Resource ¶
Resource transforms a model to API response format (Laravel API Resources). Implement ToJSON to control which fields are exposed.
type ResourceFunc ¶
ResourceFunc adapts a function to Resource.
func (ResourceFunc) ToJSON ¶
func (f ResourceFunc) ToJSON() map[string]any
Click to show internal directories.
Click to hide internal directories.