src/FactoryMuffin.php
public function create($name, array $attr = [])
    {
        $model = $this->make($name, $attr, true);

        $this->store->persist($model);

        if ($this->triggerCallback($model, $name)) {
            $this->store->persist($model);
        }

        return $model;
    }
public function create($name, array $attr = [])
    {
        $model = $this->make($name, $attr, true);

        $this->store->persist($model);

        if ($this->triggerCallback($model, $name)) {
            $this->store->persist($model);
        }

        return $model;
    }
public function create ( $ name , array $ attr = [ ] ) { $ model = $ this -> make ( $ name , $ attr , true ) ; $ this -> store -> persist ( $ model ) ; if ( $ this -> triggerCallback ( $ model , $ name ) ) { $ this -> store -> persist ( $ model ) ; } return $ model ; }
Creates and saves a model.

@param string $name The model definition name.
@param array  $attr The model attributes.

@return object
Creates and saves a model .