Simple one (I hope).
How do I hide the links section if it isn't required? For example:
GET https://app.dev/api/locums/F00BBDCF-62D5-4C2D-ADFB-B62615D64271/currency
{
"data": {
"type": "currencies",
"id": "GBP",
"attributes": {
"name": "British Pound Sterling"
},
"links": {
"self": "https://loc8um.dev/api/currencies/GBP"
}
}
}
The 'self' link there is not (and will not be) available, so I'd like to not include the 'links' section in that response.
Cheers,
Dan
Add this to your currencies schema:
public function getResourceLinks($resource)
{
return [];
}
Perfect - thanks!
Most helpful comment
Add this to your currencies schema: