l5-repository
l5-repository copied to clipboard
appends bug on create method
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 { ... }