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
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<x:layout :title="$tip->title">
|
||||
<x:layout :title="$tip->title" :preview="$tip->content">
|
||||
<main class="mx-auto flex justify-between items-center gap-8">
|
||||
<aside class="flex flex-col gap-2">
|
||||
<h2 class="text-2xl font-medium">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue