$object->getCompanyModuleId(), 'reference' => $object->getReference(), 'reference_contract' => $object->getReferenceContract(), ]; } /** * @param string $type * @return array */ protected function rules(?string $type = 'POST'): array { if ($type == 'POST') { return [ 'company_module_id' => 'required', 'reference' => '', 'reference_contract' => '' ]; } elseif ($type == 'PUT') { return [ 'id' => 'required' ]; } } /** * @return array */ protected function messages(): array { return []; } }