mirror of
https://github.com/sp-tarkov/forge.git
synced 2025-02-13 04:30:41 -05:00
paginate mods
This commit is contained in:
parent
90aeecc6d8
commit
f443364721
@ -5,9 +5,12 @@ namespace App\Livewire\User;
|
|||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
use Livewire\Attributes\Url;
|
use Livewire\Attributes\Url;
|
||||||
use Livewire\Component;
|
use Livewire\Component;
|
||||||
|
use Livewire\WithPagination;
|
||||||
|
|
||||||
class Profile extends Component
|
class Profile extends Component
|
||||||
{
|
{
|
||||||
|
use WithPagination;
|
||||||
|
|
||||||
public User $user;
|
public User $user;
|
||||||
|
|
||||||
#[Url]
|
#[Url]
|
||||||
@ -24,7 +27,9 @@ class Profile extends Component
|
|||||||
$this->followers = $this->user->followers;
|
$this->followers = $this->user->followers;
|
||||||
$this->following = $this->user->following;
|
$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) {
|
public function setSection(string $name) {
|
||||||
|
@ -108,8 +108,11 @@
|
|||||||
<p class="m-4">This is the wall. I don't think this can be implemented yet? requires comments or something</p>
|
<p class="m-4">This is the wall. I don't think this can be implemented yet? requires comments or something</p>
|
||||||
@break
|
@break
|
||||||
@case('mods')
|
@case('mods')
|
||||||
|
<div class="m-4">
|
||||||
|
{{ $mods->links() }}
|
||||||
|
</div>
|
||||||
<div class="m-4 grid grid-cols-1 gap-6 lg:grid-cols-2">
|
<div class="m-4 grid grid-cols-1 gap-6 lg:grid-cols-2">
|
||||||
@foreach($user->mods as $mod)
|
@foreach($mods as $mod)
|
||||||
<x-mod-card :mod="$mod"/>
|
<x-mod-card :mod="$mod"/>
|
||||||
@endforeach
|
@endforeach
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user