public function setMessageTypeAttribute($value) { return $this->attributes['message_type'] = static::MESSAGE_TYPES[$value] ?? null; }