This commit is contained in:
antv
2026-07-16 16:01:15 +07:00
parent 939287d9b3
commit 9c20a25111
10 changed files with 123 additions and 180 deletions
+11
View File
@@ -275,4 +275,15 @@ class UserService implements UserServiceInterface
$user->save();
}
public function getSentCardsToUserThisMonth(User $sender, string $receiverMsnv): int
{
$startOfMonth = Carbon::now()->startOfMonth();
$endOfMonth = Carbon::now()->endOfMonth();
return (int) Administration::where('msnv', $sender->msnv)
->where('receiver', $receiverMsnv)
->whereBetween('date', [$startOfMonth, $endOfMonth])
->sum('sent');
}
}