瀏覽代碼

eliminar repeticion

父節點
當前提交
b571f0ee75
共有 1 個檔案被更改,包括 3 行新增1 行删除
  1. 3
    1
      app/models/Activity.php

+ 3
- 1
app/models/Activity.php 查看文件

@@ -114,6 +114,8 @@ class Activity extends Eloquent
114 114
     $activity_criterion = DB::table('activity_criterion')
115 115
       ->join('criteria', 'criteria.id', '=', 'activity_criterion.criterion_id')
116 116
       ->where('activity_id', $this->id)
117
+      ->select('activity_criterion.activity_id', 'activity_criterion.criterion_id', 'criteria.*')
118
+      ->distinct()
117 119
       ->get();
118 120
 
119 121
 
@@ -404,4 +406,4 @@ class Activity extends Eloquent
404 406
     //return json_decode($this->outcomes_attempted, true);
405 407
     return $outcomes_attempted;
406 408
   }
407
-}
409
+}