public function getDetailAttribute() { $value = $this->text; if (in_array($value, self::EVENT_TYPES, true)) { return ['type' => array_search_null($value, self::EVENT_TYPES)]; } else { return ['type' => 'other', 'text' => $value]; } }
public function getMessageTypeAttribute($value) { return array_search_null(get_int($value), static::MESSAGE_TYPES); }
public function getTeamTypeAttribute($value) { return array_search_null($value, self::TEAM_TYPES); }
public static function modeStr($int) { return array_search_null($int, static::MODES); }