فهرست منبع

add community

visuddhinanda 3 سال پیش
والد
کامیت
70d097e624
1فایلهای تغییر یافته به همراه8 افزوده شده و 0 حذف شده
  1. 8 0
      app/Http/Controllers/TermVocabularyController.php

+ 8 - 0
app/Http/Controllers/TermVocabularyController.php

@@ -34,6 +34,14 @@ class TermVocabularyController extends Controller
             case "user":
                 break;
             case "community":
+                $localTerm = ChannelApi::getSysChannel(
+                    "_community_term_".strtolower($request->get('lang'))."_",
+                    "_community_term_en_"
+                );
+                if(!$localTerm){
+                    return $this->error('no term channel');
+                }
+                $table = $table->where('channal',$localTerm);
                 break;
         }
         $result = $table->get();