public function setUrlAttribute($value) { if (!array_key_exists('url', $this->attributes) || $value !== $this->attributes['url']) { $this->attributes['last_status'] = null; } $this->attributes['url'] = $value; }