Typically a primary key in an unsigned big integer; so any referencing foreign key should be that same type. You are using unsigned integer, so change the column definition to match the type of the id on the payments table, e.g.
$table->unsignedBigInteger('payment_id');
Or, using the convenient foreignId method, you can make the unsigned big integer column, and define the foreign key constraint in one fluent chain:
public function up()
{
Schema::create('donate_messages', function (Blueprint $table) {
$table->id();
$table->string('name')->default('Anonymous');
$table->string('message');
$table->boolean('is_live')->default(0);
$table->boolean('is_visible')->default(0);
$table->foreignId('payment_id')->constrainted('payments')->cascadeOnDelete();
$table->timestamps();
});
}
make sure your payments table migrate first and then donate_messages means your migration order must be like payment table migrating before donate_messages table