diff --git a/app/Http/Livewire/News/ArticleOverview.php b/app/Http/Livewire/News/ArticleOverview.php index 0c84fc68..1e9cc5d7 100644 --- a/app/Http/Livewire/News/ArticleOverview.php +++ b/app/Http/Livewire/News/ArticleOverview.php @@ -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'), diff --git a/resources/views/livewire/news/article-overview.blade.php b/resources/views/livewire/news/article-overview.blade.php index 6e5cbf6f..eede5e8b 100644 --- a/resources/views/livewire/news/article-overview.blade.php +++ b/resources/views/livewire/news/article-overview.blade.php @@ -173,6 +173,24 @@ @endif @endforeach +
+