I am wanting to change a static property that is set in the Database/Eloquent/Model.php file. What would be the best way to change the value from within the /app directory? The problem with making the change in that file is that updating composer could possibly overwrite it.
Here is the property:
public static $snakeAttributes = true;
Simply redefine it in your model?
class MyModel extends Eloquent {
public static $snakeAttributes = false;
}
I do not recommend to do this as all Laravel's build in using a camelCase naming.
Have a look also to the new Helpers section... You will find out some useful functions which help you create camelCase and snake_case names.