Answer the question
In order to leave comments, you need to log in
How to properly organize balance write-off?
Let's take this service as an example:
A user registers on a site where he can replenish his account and create a community, a guest of this community can request a certain service that the community creator pays for.
Let's implement it like this:
$this->balance -= $sum;
$this->save();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question