relationLoaded('documents')) { $expense->load('documents'); } return $expense; } public function sanitize() { $input = $this->all(); if ($this->expense_category_id) { $input['expense_category_id'] = ExpenseCategory::getPrivateId($this->expense_category_id); $this->replace($input); } return $this->all(); } }