fix: cash record policy, observer, n+1 query
This commit is contained in:
@@ -66,10 +66,6 @@ class CashRecordObserver
|
||||
|
||||
public function deleting(CashRecord $record): void
|
||||
{
|
||||
if ($record->verified_at !== null) {
|
||||
throw new \Illuminate\Auth\Access\AuthorizationException(
|
||||
'Transaksi yang sudah diverifikasi tidak dapat dihapus.'
|
||||
);
|
||||
}
|
||||
// Guard ditangani di CashRecordPolicy::delete() — tidak perlu throw di sini
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user