diff --git a/app/Livewire/UserStack.php b/app/Livewire/UserStack.php new file mode 100644 index 0000000..2f0ea0c --- /dev/null +++ b/app/Livewire/UserStack.php @@ -0,0 +1,19 @@ + +
+

{{$label}}

+
+
+ @foreach($users->slice(0, $limit) as $user) +
+ + {{$user->name[0]}} + +
+ {{$user->name}} +
+
+ @endforeach + @if($users->count() > $limit) +
+ +{{$users->count()-$limit}} +
+ {{$users->count()}} total +
+
+ @endif +
+ @if($users->count() > $limit) +
+ +
+ @endif + + + +

testing

+
+ +

no u

+
+ + + + {{__('Close')}} + + + +
+ diff --git a/resources/views/user/show.blade.php b/resources/views/user/show.blade.php index 19e1e40..4df26d4 100644 --- a/resources/views/user/show.blade.php +++ b/resources/views/user/show.blade.php @@ -2,12 +2,14 @@
- profile cover photo of {{ $user->name }} + profile cover photo of {{ $user->name }}
- profile photo of {{ $user->name }} + profile photo of {{ $user->name }}
@@ -17,20 +19,28 @@ @if(\Illuminate\Support\Facades\Auth::check()) @if(\Illuminate\Support\Facades\Auth::id() != $user->id) -
- -
+
+ +
@endif
- @@ -43,20 +53,20 @@

{{__("Member Since")}} {{ $user->created_at->format("M d, h:m a") }}

-
-
-

Followers:

- @foreach($user->followers as $follower) -

{{$follower->name}}

- @endforeach +
+
+ {{-- column 1 placeholder --}}
-
-

Following:

- @foreach($user->following as $following) -

{{$following->name}}

- @endforeach +
+
+ @livewire('user-stack', ['label' => 'Followers', 'users' => $user->followers]); +{{-- --}} +
+
+ @livewire('user-stack', ['label' => 'Following', 'users' => $user->following]); +{{-- --}} +
-