approve(); $this->dispatch('article-updated'); } public function reject(int $articleId): void { $article = Article::findOrFail($articleId); $article->reject(); $this->dispatch('article-updated'); } public function refresh(): void { $this->isRefreshing = true; ArticleDiscoveryJob::dispatch(); // Reset after 10 seconds $this->dispatch('refresh-complete')->self(); } public function refreshComplete(): void { $this->isRefreshing = false; } public function render() { $articles = Article::with(['feed', 'articlePublication']) ->orderBy('created_at', 'desc') ->paginate(15); $approvalsEnabled = Setting::isPublishingApprovalsEnabled(); return view('livewire.articles', [ 'articles' => $articles, 'approvalsEnabled' => $approvalsEnabled, ])->layout('layouts.app'); } }