public function update($id, array $data)
    {
        $obj = $this->find($id);
        Event::fire('repository.updating', [$obj, $data]);
        $obj->update($data);
        return $obj;
    }
public function update($id, array $data)
    {
        $obj = $this->find($id);
        Event::fire('repository.updating', [$obj, $data]);
        $obj->update($data);
        return $obj;
    }
public function update ( $ id , array $ data ) { $ obj = $ this -> find ( $ id ) ; Event :: fire ( 'repository.updating' , [ $ obj , $ data ] ) ; $ obj -> update ( $ data ) ; return $ obj ; }
Update a new object
@param       id
@param array $data
@return mixed
@throws \Illuminate\Database\Eloquent\ModelNotFoundException
Update a new object