Illuminate\Database\Eloquent\Model::getKeyForSaveQuery PHP Method

getKeyForSaveQuery() protected method

Get the primary key value for a save query.
protected getKeyForSaveQuery ( ) : mixed
return mixed
    protected function getKeyForSaveQuery()
    {
        if (isset($this->original[$this->getKeyName()])) {
            return $this->original[$this->getKeyName()];
        }
        return $this->getAttribute($this->getKeyName());
    }
Model