mirror of
https://github.com/archtechx/laravel-tips.git
synced 2025-12-12 05:14:04 +00:00
PHP 7.4 support
This commit is contained in:
parent
69d86147d7
commit
77585aa962
1 changed files with 1 additions and 1 deletions
|
|
@ -74,7 +74,7 @@ class Tip extends Model
|
||||||
'title' => (string) Str::of(Str::of($tweet->text)->explode("\n")->first())->rtrim('.')->replaceMatches('/^([^a-zA-Z]*)/', ''), // remove any non-ascii characters from the beginning
|
'title' => (string) Str::of(Str::of($tweet->text)->explode("\n")->first())->rtrim('.')->replaceMatches('/^([^a-zA-Z]*)/', ''), // remove any non-ascii characters from the beginning
|
||||||
'content' => (string) Str::of($tweet->text)->explode("\n")->skip(1)->join("\n"),
|
'content' => (string) Str::of($tweet->text)->explode("\n")->skip(1)->join("\n"),
|
||||||
'tweet_id' => $tweet->id,
|
'tweet_id' => $tweet->id,
|
||||||
'thread_slug' => $threadSlug ?? Thread::firstWhere('tweet_id', $tweet->threadId)?->slug,
|
'thread_slug' => $threadSlug ?? optional(Thread::firstWhere('tweet_id', $tweet->threadId))->slug,
|
||||||
'author_username' => Author::firstOrCreate([
|
'author_username' => Author::firstOrCreate([
|
||||||
'username' => $tweet->author->username,
|
'username' => $tweet->author->username,
|
||||||
'name' => $tweet->author->name,
|
'name' => $tweet->author->name,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue