Skip to content

Commit e3be585

Browse files
committed
add support laravel 6.x
1 parent b6eb9ca commit e3be585

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/Internal/Repository/TransactionRepository.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ public function insertOne(TransactionDtoInterface $dto): Transaction
4646
{
4747
$attributes = $this->transformer->extract($dto);
4848
$instance = $this->transaction->newInstance($attributes);
49-
assert($instance->save() === true);
49+
$result = $instance::withoutEvents(static fn () => $instance->save());
50+
assert($result === true);
51+
assert($instance->getKey() !== null);
5052

5153
return $instance;
5254
}

src/Internal/Repository/TransferRepository.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ public function insertOne(TransferDtoInterface $dto): Transfer
3636
{
3737
$attributes = $this->transformer->extract($dto);
3838
$instance = $this->transfer->newInstance($attributes);
39-
assert($instance->save() === true);
39+
$result = $instance::withoutEvents(static fn () => $instance->save());
40+
assert($result === true);
41+
assert($instance->getKey() !== null);
4042

4143
return $instance;
4244
}

0 commit comments

Comments
 (0)