mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 09:01:26 +00:00
02ad342bac
[ci skip] [skip ci]
40 lines
905 B
PHP
40 lines
905 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\Admin;
|
|
|
|
use App\Http\Controllers\BasePageController;
|
|
use App\Models\ReleaseComment;
|
|
|
|
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|\Illuminate\Routing\Redirector
|
|
*/
|
|
public function destroy($id)
|
|
{
|
|
if ($id) {
|
|
ReleaseComment::deleteComment($id);
|
|
}
|
|
|
|
return redirect()->back();
|
|
}
|
|
}
|