Skip to content

Commit 665435e

Browse files
committed
Changed default about show message
1 parent abd179e commit 665435e

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

app/Models/Presenters/UserPresenter.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,4 +81,14 @@ public function searchQuery(?string $query = null): Builder
8181
{
8282
return $this->entity->search($query);
8383
}
84+
85+
/**
86+
* @return string
87+
*/
88+
public function about():string
89+
{
90+
return $this->entity->about
91+
?? $this->entity->github_bio
92+
?? 'Если вы видите это, значит, я еще не придумал, что написать.';
93+
}
8494
}

resources/views/components/profile.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ class="link-body-emphasis text-decoration-none">
1717
@endif
1818
</a>
1919
</h6>
20-
<p class="mb-0 small line-clamp line-clamp-1 opacity-75">{{ $user->about ?? $user->github_bio ?? 'Скрытый лист' }}</p>
20+
<p class="mb-0 small line-clamp line-clamp-1 opacity-75">{{ $user->presenter()->about() }}</p>
2121
</div>
2222
</div>

0 commit comments

Comments
 (0)