The issue is caused by this line in your controller:
$user = User::findOrFail($request->user);
...
$income->created_by = $user;
Here, you're assigning the entire $user model object to the created_by column, which expects an integer (user ID). Laravel is likely falling back to the authenticated user (auth()->user()->id) behind the scenes or the cast is not happening correctly, leading to the wrong ID being stored.
You should assign just the ID of the user who is creating the record, not the entire object. Also, since you're using the logged-in user to represent the creator, use auth()->id() directly:
$income->created_by = auth()->id(); // Correct way
If you're intentionally passing the user ID as a route parameter (which isn't typical for created_by fields), ensure it's an integer, not a full object:
$income->created_by = (int) $request->user;
But the best practice is to rely on the authenticated user for created_by, like this:
$income->created_by = auth()->id();
You already correctly set $income->donor_id = $request->donor_user_id, so the donor’s ID is preserved.
Double-check your form to make sure donor_user_id is sent and that it’s not being overwritten elsewhere.
$income = new ChurchParishionerSupportIncome();
$income->donor_id = $request->donor_user_id;
$income->cause_id = $request->cause_id;
$income->is_org_member = 1;
$income->amount = $request->amount;
$income->paid = $request->paid;
$income->balance = $request->balance;
$income->comment = $request->comment;
$income->organisation_id = $request->organisation_id;
$income->created_by = auth()->id(); // <- FIXED LINE
$income->save();