static public function update($id, array $attrs)
    {
        if (is_array($id)) {
            foreach ($id as $k => $i) {
                static::update($i, $attrs[$k]);
            }
        } else {
            $object = static::find($id);
            $object->updateAttributes($attrs);
            return $object;
        }
    }
static public function update($id, array $attrs)
    {
        if (is_array($id)) {
            foreach ($id as $k => $i) {
                static::update($i, $attrs[$k]);
            }
        } else {
            $object = static::find($id);
            $object->updateAttributes($attrs);
            return $object;
        }
    }
static public function update ( $ id , array $ attrs ) { if ( is_array ( $ id ) ) { foreach ( $ id as $ k => $ i ) { static :: update ( $ i , $ attrs [ $ k ] ) ; } } else { $ object = static :: find ( $ id ) ; $ object -> updateAttributes ( $ attrs ) ; return $ object ; } }
Finds model by id and updates it.

@param string|array $id
@param array        $attrs
Finds model by id and updates it .