Wednesday, April 12, 2017

Overwrite serialization of eloquent model?

I have binary field in Eloquent model which is not properly serialized when used inside websocket events, so node.js fails to process it, because json_encode does not handle it well.

Can i overwrite how one property in my model serialized in restored?

Related question: Laravel fails to deserialize model with mysql's POINT column



via Jackson J

Advertisement