public function save($data = null, array $options = []) {
        if ($data) {
            $this->data($data);
        }

        return $this->getRepository()->save($this, $options);
    }
public function save($data = null, array $options = []) {
        if ($data) {
            $this->data($data);
        }

        return $this->getRepository()->save($this, $options);
    }
public function save ( $ data = null , array $ options = [ ] ) { if ( $ data ) { $ this -> data ( $ data ) ; } return $ this -> getRepository ( ) -> save ( $ this , $ options ) ; }
Pass the query to the repository to interact with the database.
Return the count of how many records were affected.

@param array|\Titon\Type\Contract\Arrayable $data
@param array $options
@return int
Pass the query to the repository to interact with the database . Return the count of how many records were affected .