mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
paginate news
This commit is contained in:
@@ -13,12 +13,19 @@ class ArticleOverview extends Component
|
||||
use Actions;
|
||||
use NostrTrait;
|
||||
|
||||
public $perPage = 9;
|
||||
|
||||
public array $filters = [];
|
||||
|
||||
protected $queryString = [
|
||||
'filters' => ['except' => ''],
|
||||
];
|
||||
|
||||
public function loadMore()
|
||||
{
|
||||
$this->perPage += 9;
|
||||
}
|
||||
|
||||
public function nostr($id)
|
||||
{
|
||||
$libraryItem = LibraryItem::query()
|
||||
@@ -84,7 +91,7 @@ class ArticleOverview extends Component
|
||||
->where('type', 'markdown_article')
|
||||
->where('news', true)
|
||||
->orderByDesc('created_at')
|
||||
->get(),
|
||||
->paginate($this->perPage),
|
||||
])->layout('layouts.app', [
|
||||
'SEOData' => new SEOData(
|
||||
title: __('News'),
|
||||
|
||||
Reference in New Issue
Block a user