Return associative array/collection (key-value result) in Laravel JsonResource
I recently ran into the same issue as mentioned in this stackoverflow thread: https://stackoverflow.com/questions/52613298/return-array-in-laravel-api-resource-without-reordering-keys
If you have custom data structures and you want to use JsonResource's for constency sake,…
→