The error message suggests that the updated_at column is missing in the school_teacher table. This is because Laravel's Eloquent ORM expects the table to have created_at and updated_at columns by default. To fix this issue, you can add the timestamps() method to the migration file:
Schema::create('school_teacher', function (Blueprint $table) {
$table->foreignId('school_id')->constrained();
$table->foreignId('user_id')->constrained();
$table->foreignId('teacher_status_type_id')->constrained();
$table->primary(['school_id','user_id']);
$table->timestamps(); // add this line
});
This will add the created_at and updated_at columns to the school_teacher table. Once you've made this change, you can run the migration again to update the table:
php artisan migrate
After that, you should be able to run the seeder without any issues.