Răsfoiți Sursa

add community

visuddhinanda 3 ani în urmă
părinte
comite
70d097e624
1 a modificat fișierele cu 8 adăugiri și 0 ștergeri
  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();