Can I use camelCase with Laravel 4 eloquent?
问题 I have existing data in a mysql db whose columns are camelCased. I can't change them to snake case. For instance: when I try to use "jobRole", I get "job_role". I want it to be "jobRole". Is there a setting in laravel to support this? I've read about mutators but don't understand them. Is that the solution? If so, how do I do this? 回答1: Discovered you can do this. In the model, redefine "snakeAttributes" to "false" like this: class YourModel extends Eloquent{ public static $snakeAttributes =