App\Data\Repositories\Repository::fillAndSave PHP Méthode

fillAndSave() public méthode

Fills out an instance of the model and saves it, pretty much like mass assignment.
public fillAndSave ( array $attributes ) : Model
$attributes array
Résultat Illuminate\Database\Eloquent\Model
    public function fillAndSave($attributes)
    {
        $this->model->fill($attributes);
        $this->model->save();
        return $this->model;
    }