There I was developing my Laravel API for my react application when I see the following 500 error in my console:

Server Error

OK now what. I looked my Laravel Error Logs at: storage/logs and this is what shows up:

[2023-08-22 19:09:59] production.ERROR: SQLSTATE[HY000]: General error: 1364 Field 'id' doesn't have a default value (SQL: insert into `user_tasks` (`user_id`....) values (32...) [stacktrace]

Solution:

Looking my my user_tasks table, everything looked fine. Field id was primary with key, not null as default. BUT I did not see the AUTO_INCREMENT, so I added with this simple command in phpMyAdmin

ALTER TABLE `user_tasks` CHANGE `id` `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT;

Done, it worked. Not getting this error anymore.