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

        if (empty($model)) return false;

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

        if (empty($model)) return false;

        return $model->fill($data)->save();
    }
public function update ( array $ data , $ id , $ attribute = null ) { $ model = $ this -> find ( $ id , [ '*' ] , $ attribute ) ; if ( empty ( $ model ) ) return false ; return $ model -> fill ( $ data ) -> save ( ) ; }
Updates a model by id

@param  array  $data
@param  mixed  $id
@param  string $attribute
@return bool     false if could not find model or not succesful in updating
Updates a model by id