createFieldsAndModel() публичный Метод

Creates a new model from the given fields
public createFieldsAndModel ( array $fields, array $page ) : array(Collection,
$fields array
$page array
Результат array(Collection,
Пример #1
0
 /**
  * Model creators use this to create new model fields
  * for a model (model creator)
  *
  * @param  array $input
  * @return array
  */
 public function executeModelFieldsCreate($input)
 {
     try {
         list($fields, $model) = $this->ModelManager->createFieldsAndModel($input['fields'], $input['page']);
     } catch (ModelFieldValidationFailedException $e) {
         return $this->Response->json(['errors' => $e->getErrors()], 403);
     }
     return array('model' => $model, 'fields' => $fields);
 }