REFACTORING #1880 @4h30m: another ugly refactoring commit
This commit is contained in:
@@ -14,12 +14,12 @@ class CreateNewComment extends Controller
|
||||
public function postNew(\Modules\Blog\Article\Http\Requests\CreateNewComment $request, $articleId)
|
||||
{
|
||||
$article = Content::where('id', $articleId)
|
||||
->where('module_handler', Article::class)
|
||||
->where('moduleHandler', Article::class)
|
||||
->firstOrFail();
|
||||
|
||||
$article->module_settings = json_decode($article->module_settings);
|
||||
$article->moduleSettings = json_decode($article->moduleSettings);
|
||||
|
||||
if (!isset($article->module_settings->allowComments) || !$article->module_settings->allowComments) {
|
||||
if (!isset($article->moduleSettings->allowComments) || !$article->moduleSettings->allowComments) {
|
||||
return redirect()
|
||||
->route('page.content', ['url' => $article->url])
|
||||
->with('error', trans('article::comments.disabledComments'));
|
||||
|
||||
Reference in New Issue
Block a user