How to only use created_at in Laravel

后端 未结 17 2064
自闭症患者
自闭症患者 2020-12-07 18:20

I want only use created_at , how to do it?

I know:

This can custom timestamps name

const CREATED_AT = \'created\';
const UPDATED_AT = \'updat         


        
17条回答
  •  一整个雨季
    2020-12-07 19:05

    In version 5.3 I just did public $timestamps = false; and then added protected $fillable = ['created_at']. Note: You can add anything you want, just make sure it matches the one in your table.`

提交回复
热议问题