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

Note that this method cannot be used to modify existing definitions. Please use the getDefinition method for that.
public define ( string $name ) : League\FactoryMuffin\Definition
$name string The model definition name.
Результат League\FactoryMuffin\Definition
Пример #1
0
 /**
  * Creates a model definition. This can be used from a helper:.
  *
  * ```php
  * $this->getModule('{{MODULE_NAME}}')->_define('User', [
  *     'name' => $faker->name,
  *     'email' => $faker->email
  * ]);
  *
  * ```
  *
  * @param $model
  * @param $fields
  *
  * @return \League\FactoryMuffin\Definition
  *
  * @throws \League\FactoryMuffin\Exceptions\DefinitionAlreadyDefinedException
  */
 public function _define($model, $fields)
 {
     return $this->factoryMuffin->define($model)->setDefinitions($fields);
 }