mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 17:28:55 +00:00
87c6e5d64f
[ci skip] [skip ci]
41 lines
881 B
PHP
41 lines
881 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\Admin;
|
|
|
|
use App\Models\ReleaseComment;
|
|
use App\Http\Controllers\BasePageController;
|
|
|
|
class CommentsController extends BasePageController
|
|
{
|
|
/**
|
|
* @throws \Exception
|
|
*/
|
|
public function index()
|
|
{
|
|
$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();
|
|
}
|
|
|
|
/**
|
|
* @param $id
|
|
*
|
|
* @return \Illuminate\Http\RedirectResponse
|
|
*/
|
|
public function destroy($id)
|
|
{
|
|
if ($id) {
|
|
ReleaseComment::deleteComment($id);
|
|
}
|
|
|
|
return redirect()->back();
|
|
}
|
|
}
|