diff --git a/app/Livewire/User/Profile.php b/app/Livewire/User/Profile.php index 96cf616..82c4675 100644 --- a/app/Livewire/User/Profile.php +++ b/app/Livewire/User/Profile.php @@ -5,9 +5,12 @@ namespace App\Livewire\User; use App\Models\User; use Livewire\Attributes\Url; use Livewire\Component; +use Livewire\WithPagination; class Profile extends Component { + use WithPagination; + public User $user; #[Url] @@ -24,7 +27,9 @@ class Profile extends Component $this->followers = $this->user->followers; $this->following = $this->user->following; - return view('livewire.user.profile'); + $mods = $this->user->mods()->paginate(6); + + return view('livewire.user.profile', compact('mods')); } public function setSection(string $name) { diff --git a/resources/views/livewire/user/profile.blade.php b/resources/views/livewire/user/profile.blade.php index 6faed79..8d856f8 100644 --- a/resources/views/livewire/user/profile.blade.php +++ b/resources/views/livewire/user/profile.blade.php @@ -108,8 +108,11 @@

This is the wall. I don't think this can be implemented yet? requires comments or something

@break @case('mods') +
+ {{ $mods->links() }} +
- @foreach($user->mods as $mod) + @foreach($mods as $mod) @endforeach