SQLSTATE[42000]: Syntax error or access violation: 1072 Key column 'company_id' doesn't exist in table (SQL: alter table `project_user` add constraint `project_user_company_id_foreign` foreign key (`company_id`) references `companies` (`id`)) code example
Example: Syntax error or access violation: 1072 Key column 'user_id' doesn't exist in table (SQL: alter table `groups` add constraint `groups_user_id_foreign` foreign key (`user_id`) references `users` (`id`))
$table->integer('user_id')->unsigned();
$table->foreign('user_id')->references('id')->on('users');