refactor: use _id suffix on bon_transactions foreign keys

This commit is contained in:
Roardom
2023-07-22 21:30:50 +00:00
parent 074b04dd84
commit 229eed8091
18 changed files with 110 additions and 97 deletions
+2 -2
View File
@@ -81,8 +81,8 @@ class UserController extends Controller
->with(['torrenttitle', 'warneduser'])
->latest('created_at')
->paginate(10, ['*'], 'deletedWarningsPage'),
'boughtUpload' => BonTransactions::where('sender', '=', $user->id)->where([['name', 'like', '%Upload%']])->sum('cost'),
// 'boughtDownload' => BonTransactions::where('sender', '=', $user->id)->where([['name', 'like', '%Download%']])->sum('cost'),
'boughtUpload' => BonTransactions::where('sender_id', '=', $user->id)->where([['name', 'like', '%Upload%']])->sum('cost'),
// 'boughtDownload' => BonTransactions::where('sender_id', '=', $user->id)->where([['name', 'like', '%Download%']])->sum('cost'),
'invitedBy' => Invite::where('accepted_by', '=', $user->id)->first(),
'clients' => $user->peers()
->select('agent', 'port')