예제 #1
0
 /**
  * @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));
 }
예제 #2
0
 /**
  * Process the data.
  *
  * @param array $data
  */
 protected function process(array $data)
 {
     parent::process($data);
     $this->addInner($data);
 }