فهرست منبع

Stop loading pros list in controller

Vijayakrishnan 4 سال پیش
والد
کامیت
e83c97b32a
1فایلهای تغییر یافته به همراه6 افزوده شده و 4 حذف شده
  1. 6 4
      app/Http/Controllers/Controller.php

+ 6 - 4
app/Http/Controllers/Controller.php

@@ -33,8 +33,10 @@ class Controller extends BaseController
         }
         view()->share('performer', $this->performer);
 
-        $this->pros =  Pro::all();
-        if($this->pro && $this->pro->pro_type != 'ADMIN'){ 
+        $this->pros = [];
+
+        /*$this->pros =  Pro::all();
+        if($this->pro && $this->pro->pro_type != 'ADMIN'){
             $accessiblePros = ProProAccess::where('owner_pro_id', $this->pro->id);
             $accessibleProIds = [];
             foreach($accessiblePros as $accessiblePro){
@@ -43,11 +45,11 @@ class Controller extends BaseController
             $accessibleProIds[] = $this->pro->id;
 
             $this->pros = Pro::whereIn('id', $accessibleProIds)->get();
-        }
+        }*/
 
         view()->share('pros',$this->pros);
         view()->share('notes', Note::all());
-        
+
         $noteTemplates = NoteTemplate::all();
         view()->share('noteTemplates', $noteTemplates);