use ternaries instead of optionals

This commit is contained in:
Godfrey M
2025-07-15 15:40:21 -07:00
parent 214757ab0b
commit f62b5df566

View File

@@ -26,8 +26,7 @@ class CheckoutComponentMail extends Mailable
$this->note = $note;
$this->target = $checkedOutTo;
$this->acceptance = $acceptance;
$this->qty = optional(optional($component->assets->first())->pivot)->assigned_qty;
$this->qty = $component->assets->first()?->pivot?->assigned_qty;
$this->settings = Setting::getSettings();
}