Update ShowsController add show-remove option

This commit is contained in:
DariusIII
2018-04-19 15:05:40 +02:00
parent 5016aeb6d0
commit 52ecfc787c
5 changed files with 33 additions and 59 deletions
@@ -2,6 +2,7 @@
namespace App\Http\Controllers\Admin;
use App\Models\Release;
use App\Models\Video;
use Illuminate\Http\Request;
use Blacklight\processing\tv\TV;
@@ -77,4 +78,33 @@ class ShowsController extends BasePageController
);
$this->adminrender();
}
/**
* @param $id
*
* @throws \Exception
*/
public function destroy($id)
{
$this->setAdminPrefs();
$success = false;
if ($id) {
$success = Release::removeVideoIdFromReleases($id);
$this->smarty->assign('videoid', $id);
}
$this->smarty->assign('success', $success);
$title = 'Remove Video and Episode IDs from Releases';
$content = $this->smarty->fetch('show-remove.tpl');
$this->smarty->assign(
[
'title' => $title,
'content' => $content,
]
);
$this->adminrender();
}
}