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

updateTimestamps() protected method

Update the creation and update timestamps.
protected updateTimestamps ( ) : void
return void
    protected function updateTimestamps()
    {
        $time = $this->freshTimestamp();
        if (!$this->isDirty(static::UPDATED_AT)) {
            $this->setUpdatedAt($time);
        }
        if (!$this->exists && !$this->isDirty(static::CREATED_AT)) {
            $this->setCreatedAt($time);
        }
    }
Model