In Laravel two fields are auto filled or modified they are created_at and updated_at but what if your table have different named fields example created and modified in it's place they won't be auto filled or modified automatically. So to make them replacement of created_at and modified_at you need to add the following lines to your table model.
/**
* The name of the "created at" column.
*
* @var string
*/
const CREATED_AT = 'created';
/**
* The name of the "updated at" column.
*
* @var string
*/
const UPDATED_AT = 'modified';
0 Comment(s)