Skip to content
Advertisement

I am always getting an error everytime i try to add data in db: SQLSTATE[42703]: Undefined column: 7 ERROR: column

So, theres already a pre-made table in the database. Now, I am trying to connect my project to that specific table in the db. but everytime i try to insert data, im getting this error

“SQLSTATE[42703]: Undefined column: 7 ERROR: column “updated_at” of relation “applicant_account_tbl” does not existnLINE 1: …”, “last_name”, “birthdate”, “email”, “password”, “updated_a…n ^ (SQL: insert into “applicant_account_tbl” (“first_name”, “middle_name”, “last_name”, “birthdate”, “email”, “password”, “updated_at”, “created_at”) values (James, Middle, Harden, 1998-11-05, jamesharden@gmail.com, $2y$10$CQRx2rmNrHahA6Lrw3OsIufeZXvAEhUOquotthM.9dr40NKRu1bJK, 2022-11-18 00:16:01, 2022-11-18 00:16:01))” trace : [,…]

Here is my model

JavaScript

Here is my controller for registration

JavaScript

Advertisement

Answer

add $timestamps = false to UserModel

JavaScript

https://laravel.com/docs/9.x/eloquent#timestamps

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement