query('client'); if ($clientId) { $this->data['client_id'] = $clientId; } } public function getMaxContentWidth(): MaxWidth | string | null { return MaxWidth::Full; } protected function handleRecordCreation(array $data): Model { /** @var Invoice $record */ $record = parent::handleRecordCreation($data); $this->handleLineItems($record, collect($data['lineItems'] ?? [])); $totals = $this->updateDocumentTotals($record, $data); $record->updateQuietly($totals); return $record; } }