Skip to content

Commit

Permalink
fix: unexpected incrementEach effects
Browse files Browse the repository at this point in the history
  • Loading branch information
Roardom committed May 28, 2024
1 parent 8d9fb6f commit 2117a4f
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions app/Http/Controllers/BountyController.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,11 @@ public function store(StoreTorrentRequestBountyRequest $request, TorrentRequest

$bounty = $torrentRequest->bounties()->create(['user_id' => $user->id] + $request->validated());

$torrentRequest->incrementEach([
'votes' => 1,
'bounty' => $request->integer('seedbonus'),
], [
'created_at' => now(),
]);
$torrentRequest->increment('bounty', $request->integer('seedbonus'));

$torrentRequest->votes++;
$torrentRequest->created_at = now();
$torrentRequest->save();

if ($request->boolean('anon') == 0) {
$this->chatRepository->systemMessage(
Expand Down

0 comments on commit 2117a4f

Please sign in to comment.