query = $this->loadService(InvoiceRepositoryQuery::class); } public function getDefaultOptionsSearch(): array { return [ 'with' => [], 'join_with' => ['user AS user_invoice', 'producer'], 'orderby' => 'date ASC', 'attribute_id_producer' => 'invoice.id_producer' ]; } public function findOneInvoiceById(int $id): ?Invoice { return Invoice::searchOne(['id' => $id]); } }