Skip to content

Commit d805806

Browse files
committed
remove facade use. DB::raw()
1 parent 8248cf9 commit d805806

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Internal/Repository/TransferRepository.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
use Bavix\Wallet\Internal\Query\TransferQueryInterface;
99
use Bavix\Wallet\Internal\Transform\TransferDtoTransformerInterface;
1010
use Bavix\Wallet\Models\Transfer;
11-
use Illuminate\Support\Facades\DB;
1211

1312
final class TransferRepository implements TransferRepositoryInterface
1413
{
@@ -55,11 +54,13 @@ public function findBy(TransferQueryInterface $query): array
5554
*/
5655
public function updateStatusByIds(string $status, array $ids): int
5756
{
57+
$connection = $this->transfer->getConnection();
58+
5859
return $this->transfer->newQuery()
5960
->toBase()
6061
->whereIn($this->transfer->getKeyName(), $ids)
6162
->update([
62-
'status_last' => DB::raw('status'),
63+
'status_last' => $connection->raw('status'),
6364
'status' => $status,
6465
])
6566
;

0 commit comments

Comments
 (0)