11 months ago

Laravel create method inserting timestamp to updated_at column as well

Posted 11 months ago by ssquare

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?

Please sign in or create an account to participate in this conversation.