How to only use created_at in Laravel

后端 未结 17 2123
自闭症患者
自闭症患者 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:03

    I used very simple hack ;)

    class MyClass extends Model {

    const CREATED_AT = 'creation_date';
    const UPDATED_AT = 'creation_date';
    

    }

    I just pointed both to the same column :)

提交回复
热议问题