Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Paul-Hadfield's avatar

API Resource differences between Mac and Linux?

I'm seeing a strange difference between our prod (Linux) server and locally (Mac) when serialising data to JSON via the API. Both are running same version of Laravel 6.18.2. In our model we have a property "type" and on prod we get a field "type_id" and a json property type: {id, ... }, which contains all the fields in the type object. Running locally (same code) only returns type_id, it doesn't serialise type object. Does this make sense, has anyone run into this kind of thing before?

0 likes
0 replies

Please or to participate in this conversation.