Tuesday, February 28, 2017

Eloquent not allowing fields starting with an underscore

Eloquent explicitly rejects fields/columns starting with an underscore

http://ift.tt/2mAyCcj

It was introduced here

http://ift.tt/2m2x8de

It seems the only way around this is to manually specify each underscore column as fillable or set unguarded to be true.

Is there any reason for this ? Only reasons I can think would be a system where prefixing _ means a private variable and not put in the to DB ? Seems odd when underscore is a valid column prefix in SQL




via exussum

Advertisement