mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 09:01:26 +00:00
36 lines
841 B
PHP
36 lines
841 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\Admin;
|
|
|
|
use App\Http\Controllers\BasePageController;
|
|
use App\Models\ReleaseComment;
|
|
|
|
class AdminCommentsController extends BasePageController
|
|
{
|
|
/**
|
|
* @throws \Exception
|
|
*/
|
|
public function index(): void
|
|
{
|
|
$this->setAdminPrefs();
|
|
|
|
$meta_title = $title = 'Comments List';
|
|
|
|
$commentsList = ReleaseComment::getCommentsRange();
|
|
$this->smarty->assign('commentslist', $commentsList);
|
|
|
|
$content = $this->smarty->fetch('comments-list.tpl');
|
|
$this->smarty->assign(compact('title', 'meta_title', 'content'));
|
|
$this->adminrender();
|
|
}
|
|
|
|
public function destroy(int $id): \Illuminate\Http\RedirectResponse
|
|
{
|
|
if ($id) {
|
|
ReleaseComment::deleteComment($id);
|
|
}
|
|
|
|
return redirect()->back();
|
|
}
|
|
}
|