Explorar el Código

直接从参数获取res_type

visuddhinanda hace 2 años
padre
commit
8f9ce8fbf6
Se han modificado 1 ficheros con 1 adiciones y 2 borrados
  1. 1 2
      app/Http/Controllers/DiscussionController.php

+ 1 - 2
app/Http/Controllers/DiscussionController.php

@@ -68,8 +68,7 @@ class DiscussionController extends Controller
                         'can_reply' => false,
                         ]);
                 }
-                $resType = Discussion::where('res_id',$request->get('id'))
-                                        ->value('res_type');
+                $resType = $request->get('res_type');
                 if($user){
                     switch ($resType) {
                         case 'sentence':