Browse Source

直接从参数获取res_type

visuddhinanda 2 năm trước cách đây
mục cha
commit
8f9ce8fbf6
1 tập tin đã thay đổi với 1 bổ sung2 xóa
  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':