Eloquent, use snake_case in database, but camelCase while operating with json (both request/response)

88 Views Asked by At

I have a Lumen application using Eloquent, and I was just wondering why isn't a way of storing my model properties in camel_case in the database, but using camelCase while handling requests and responses. I found the package Eloquence\Behaviours\CamelCasing and it is working perfectly for the responses, but it doesn't work for the requests. Is there an easy way? Am I missing something?

0

There are 0 best solutions below