Skip to content

Commit

Permalink
Sale observer periodicities touch
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelnakamura committed Jun 20, 2022
1 parent 72c26e2 commit ac2df8d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Observers/SaleObserver.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,18 @@ public function created($sale)
try {
$issSupernova = new IssSupernova();
$response = $issSupernova->sales()->create($data);
return $response;
} catch (\Throwable $exception) {
Log::error($exception->getMessage());
throw $exception;
}

if ($sale->periodicities) {
foreach ($sale->periodicities as $periodicity) {
$periodicity->touch();
}
}

return $response;
}

public function updated($sale)
Expand Down

0 comments on commit ac2df8d

Please sign in to comment.