mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-30 17:58:59 +00:00
Use Laravel framework 8
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use App\Http\Controllers\BasePageController;
|
||||
use App\Models\ReleaseComment;
|
||||
|
||||
class AdminCommentsController 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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user