no message
This commit is contained in:
parent
d1697e51aa
commit
5873c129e2
@ -59,17 +59,13 @@ final class Node extends Model
|
|||||||
return $sMemoFront;
|
return $sMemoFront;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getDuckClassAttribute()
|
public function getDuckClassAttribute(): string
|
||||||
{
|
{
|
||||||
$sLocation = '';
|
$sLocation = $this->duck_group ?: ($this->duck_code ?? '');
|
||||||
|
|
||||||
if ($this->duck_group) {
|
$sBeforeDash = strstr($sLocation, '-', true) ?: $sLocation;
|
||||||
$sLocation = $this->duck_group;
|
|
||||||
} else {
|
return preg_replace('/\d+/', '', $sBeforeDash);
|
||||||
$sLocation = $this->duck_code;
|
|
||||||
}
|
|
||||||
|
|
||||||
return preg_replace('/[^a-zA-Z\x{4e00}-\x{9fa5}]/u', '', $sLocation ?? '');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user