public function update($id, array $attributes)
    {
        if ($this->can('update')) {

            $this->flow->getLogger()->debug("Updating Resource Id: $this->id => $id");

            $attributes = $this->updateableAttributes
                ? array_intersect_key($attributes, array_flip($this->updateableAttributes))
                : $attributes;

            return $this->make(
                $this->performUpdate(
                    array_merge($attributes, [$this->id => $id])
                )
            );
        }

        throw new \BadMethodCallException('Method '.__FUNCTION__.' does not exist');
    }
public function update($id, array $attributes)
    {
        if ($this->can('update')) {

            $this->flow->getLogger()->debug("Updating Resource Id: $this->id => $id");

            $attributes = $this->updateableAttributes
                ? array_intersect_key($attributes, array_flip($this->updateableAttributes))
                : $attributes;

            return $this->make(
                $this->performUpdate(
                    array_merge($attributes, [$this->id => $id])
                )
            );
        }

        throw new \BadMethodCallException('Method '.__FUNCTION__.' does not exist');
    }
public function update ( $ id , array $ attributes ) { if ( $ this -> can ( 'update' ) ) { $ this -> flow -> getLogger ( ) -> debug ( "Updating Resource Id: $this->id => $id" ) ; $ attributes = $ this -> updateableAttributes ? array_intersect_key ( $ attributes , array_flip ( $ this -> updateableAttributes ) ) : $ attributes ; return $ this -> make ( $ this -> performUpdate ( array_merge ( $ attributes , [ $ this -> id => $ id ] ) ) ) ; } throw new \ BadMethodCallException ( 'Method ' . __FUNCTION__ . ' does not exist' ) ; }
Updates a Resource

@param $id
@param mixed ...$attributes
@return mixed
Updates a Resource