79717159

Date: 2025-07-28 10:09:02
Score: 1.5
Natty:
Report link

There are several things suboptimal with your code, although its not directly visible why the described behaviour occurs.

  1. $request->user looks wrong. The user form field isnt defined, and $request->user() gives you the logged in user anyways, just as Auth::user(). findOrFail expects an id. Even if it works for created_by I would clean this up.

  2. Use unsigned integers or foreignId for ids and decimal for balance amounts.

  3. If you say the correct donor_id lands in the request, it shouldnt be saved differently. Is this really true? You are accessing $member->user_id - are members also users? Shouldnt it be $member->id then? Can you dd the whole $income before saving it - what does it look like?

  4. Do you have attribute casting on your model?

Reasons:
  • RegEx Blacklisted phrase (2.5): Do you have a
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • High reputation (-2):
Posted by: Alex