Reserved column names in Eloquent

前端 未结 2 1016
自闭症患者
自闭症患者 2021-01-18 13:15

From a cursory look into Illuminate\\Database\\Eloquent\\Model I can see the following instance attributes:

protected $connection
protected $tab         


        
相关标签:
2条回答
  • 2021-01-18 14:05

    It appears that $changes is also a reserved name.

    0 讨论(0)
  • 2021-01-18 14:06

    These attributes can not be static because they are used as their model configuration. If you rewrites them in your model class, you define your own parameters, if not, the Eloquent believes it should use the defaults. Yes, you should not have a column name in your table that matches the name of one of these attributes.

    0 讨论(0)
提交回复
热议问题