mirror of
https://github.com/archtechx/laravel-tips.git
synced 2025-12-12 05:14:04 +00:00
push
This commit is contained in:
parent
8dae8d1250
commit
481dd3c3fb
2 changed files with 2 additions and 2 deletions
|
|
@ -68,7 +68,7 @@ class Tip extends Model
|
|||
return array_map(fn (string $url) => new TwitterImage($url), $this->images);
|
||||
}
|
||||
|
||||
public static function fromTweet(Tweet $tweet, string $threadSlug = null): static
|
||||
public static function fromTweet(Tweet $tweet, string $threadSlug = null): self
|
||||
{
|
||||
return new static([
|
||||
'title' => (string) Str::of(Str::of($tweet->text)->explode("\n")->first())->rtrim('.')->replaceMatches('/^([^a-zA-Z]*)/', ''), // remove any non-ascii characters from the beginning
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue