cloudcreativity / laravel-json-api

JSON API (jsonapi.org) package for Laravel applications.
http://laravel-json-api.readthedocs.io/en/latest/
Apache License 2.0
778 stars 109 forks source link

getResourceLinks function #643

Closed KierynAnnette closed 6 months ago

KierynAnnette commented 7 months ago

Looks like this function can no longer be used to override the high level links in the schema. Has this been changed to something else?

Adding:

public function getResourceLinks(mixed $resource): iterable { return []; }

no longer removes the high level links in the response.

lindyhopchris commented 6 months ago

@KierynAnnette thanks for raising this.

I've attempted to fix on #644

Can you give it a go and let me know if it works?

composer require "cloudcreativity/laravel-json-api:dev-issue643"
KierynAnnette commented 6 months ago

@lindyhopchris I am only using v5 at the moment. But I applied your changes to that version and I can remove links and add my own. Looks good to me. Thanks

lindyhopchris commented 6 months ago

Thanks! I've merged this into v6 and tagged v6.1.0 so whenever you upgrade your Laravel version you'll be able to get these changes.