src/BaseRepository.php
public function fill(array $data, $id, $attribute = null)
    {
        $model = $this->find($id, ['*'], $attribute);

        if (empty($model)) {
            throw (new ModelNotFoundException)->setModel($this->model());
        }

        return $model->fill($data);
    }
public function fill(array $data, $id, $attribute = null)
    {
        $model = $this->find($id, ['*'], $attribute);

        if (empty($model)) {
            throw (new ModelNotFoundException)->setModel($this->model());
        }

        return $model->fill($data);
    }
public function fill ( array $ data , $ id , $ attribute = null ) { $ model = $ this -> find ( $ id , [ '*' ] , $ attribute ) ; if ( empty ( $ model ) ) { throw ( new ModelNotFoundException ) -> setModel ( $ this -> model ( ) ) ; } return $ model -> fill ( $ data ) ; }
Finds and fills a model by id, without persisting changes

@param  array  $data
@param  mixed  $id
@param  string $attribute
@return Model|false
@throws \Illuminate\Database\Eloquent\MassAssignmentException
Finds and fills a model by id without persisting changes