wip: article AI polish, category SEO fields, cover generator, membership plan seeder
This commit is contained in:
@@ -66,4 +66,18 @@ class Comment extends Model
|
||||
{
|
||||
return $this->moderation_status === self::STATUS_APPROVED;
|
||||
}
|
||||
|
||||
public function websiteHref(): ?string
|
||||
{
|
||||
$url = trim((string) $this->url);
|
||||
if ($url === '') {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (! preg_match('#^https?://#i', $url)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $url;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user