It's the default behaviour... you can do it manually in adding public $timestamps = false; in your model, and manually handle timestamp.
IMO, I go this way, and query when created_at is different from updated_at to have the real updated lines.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I am trying to insert data with something simple like
$data_arr['created_by'] = $this->data['user_id'];
$data_table = Model::create($data_arr);
But it is updating both created_at and updated_at table at once. I don't want to fill updated_at column at the time of creation.
How can I get rid of this?
It's the default behaviour... you can do it manually in adding public $timestamps = false; in your model, and manually handle timestamp.
IMO, I go this way, and query when created_at is different from updated_at to have the real updated lines.
Please or to participate in this conversation.