public function update(array $data, $id)
    {
        $resource = $this->model->find($id);
        
        if (! $resource) {
            return '';
        }
        
        $resource->update($data);
        
        return $resource;
    }
public function update(array $data, $id)
    {
        $resource = $this->model->find($id);
        
        if (! $resource) {
            return '';
        }
        
        $resource->update($data);
        
        return $resource;
    }
public function update ( array $ data , $ id ) { $ resource = $ this -> model -> find ( $ id ) ; if ( ! $ resource ) { return '' ; } $ resource -> update ( $ data ) ; return $ resource ; }
Update a resource by id

@param $data array
@param $id int
@return boolean
Update a resource by id