Laravel 5 + Eloquent toJson/toArray causes Strange Segmentation Faults
问题 I hate to be answering my own question, so maybe you can help me find what fixed this. I have some eloquent models which belongTo each-other, and I set them up via association like this. It's all normal stuff. This process unfortunately causes $device to work erratically. Below you can see individual values are accessible but any form of jsonification destroys the server without error. $device = $truck->device; if(is_null($device) || empty($device)) { $device = new Devices; } $device->truck()