mirror of
https://github.com/archtechx/laravel-tips.git
synced 2025-12-12 05:14:04 +00:00
Support moments in thread tweet_id
This commit is contained in:
parent
798cf7f1b9
commit
8e123a49f4
1 changed files with 5 additions and 1 deletions
|
|
@ -55,7 +55,11 @@ class Thread extends Model
|
||||||
|
|
||||||
public function getTweetUrlAttribute(): string
|
public function getTweetUrlAttribute(): string
|
||||||
{
|
{
|
||||||
return "https://twitter.com/{$this->author_username}/status/{$this->tweet_id}";
|
if (is_numeric($this->tweet_id)) {
|
||||||
|
return "https://twitter.com/{$this->author_username}/status/{$this->tweet_id}";
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->tweet_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getKeyName()
|
public function getKeyName()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue