/** * @param BaseForm $form * @param BaseFormData $data * * @return \Illuminate\Http\JsonResponse */ protected function validateAndSave(BaseForm $form, BaseFormData $data) { $data->validate(); $model = $data->save(); return new JsonResponse($form->extract($model)); }
/** * Process the data. * * @param array $data */ protected function process(array $data) { parent::process($data); $this->addInner($data); }