My book table's primary key is called ISBN.
But when I try to update others columns using the ISBN I get the following error:
I can fix it changing the eloquent query, but I want to know why this mistake appears.
Thanks in advance!
My book table's primary key is called ISBN.
But when I try to update others columns using the ISBN I get the following error:
I can fix it changing the eloquent query, but I want to know why this mistake appears.
Thanks in advance!
Laravel automatically converts the names of relationships from camelCase to snake_case when the model is converted to an array (toArray()) or json (toJson()).
to avoid this changes write this line in your model:
public static $snakeAttributes = false;
see: