Browse Source

create-by-channel add 'studio'

visuddhinanda 3 years ago
parent
commit
e16e9efdf9
1 changed files with 3 additions and 1 deletions
  1. 3 1
      app/Http/Controllers/DhammaTermController.php

+ 3 - 1
app/Http/Controllers/DhammaTermController.php

@@ -76,6 +76,7 @@ class DhammaTermController extends Controller
                     "meaningCount"=>$meaningCount,
                     "studioChannels"=>$studioChannels,
                     "language"=>$currChannel->lang,
+                    'studio'=>StudioApi::getById($currChannel->owner_uid),
                 ]);
                 break;
             case 'studio':
@@ -377,7 +378,8 @@ class DhammaTermController extends Controller
                 break;
             case 'studio':
                 # code...
-                $rows = DhammaTerm::where('channal',$request->get("name"))->cursor();
+                $studioId = StudioApi::getIdByName($request->get("name"));
+                $rows = DhammaTerm::where('owner',$studioId)->cursor();
                 break;
             default:
                 $this->error('no view');