andersao / andersao/l5-repository
appends bug on create method
Aberta
- Linguagem predominante
- PHP
- Estrelas
- 4.2k
- Forks
- 880
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Descrição
The create method fails to save to the model when there are appends attributes on the model. The appends attributes are not on the model therefore fail the sql insert will generate an exception.
Just as was fixed for update() , the create() method needs setAppends
public function create(array $attributes)
...
$this->model->setAppends([]);
if ($this->versionCompare($this->app->version(), "5.2.*", ">")) {
$attributes = $this->model->newInstance()->forceFill($attributes)->makeVisible($this->model->getHidden())->toArray();
} else {
...
}
Guia de contribuição
Avaliação
Esta issue ainda não foi avaliada.