|
@@ -179,10 +179,12 @@ class IndexController extends Controller
|
|
$users = [] ;
|
|
$users = [] ;
|
|
$arr1 = [];
|
|
$arr1 = [];
|
|
foreach ($arr as $k => $v){
|
|
foreach ($arr as $k => $v){
|
|
- if (!array_key_exists($v->pivot->dream_user_id,$arr1)) {
|
|
|
|
- $arr1[$v->pivot->dream_user_id] = $v->pivot->interaction_number;
|
|
|
|
- }else{
|
|
|
|
- $arr1[$v->pivot->dream_user_id] += $v->pivot->interaction_number;
|
|
|
|
|
|
+ if ($v->pivot->interaction_number > 0) {
|
|
|
|
+ if (!array_key_exists($v->pivot->dream_user_id,$arr1)) {
|
|
|
|
+ $arr1[$v->pivot->dream_user_id] = $v->pivot->interaction_number;
|
|
|
|
+ }else{
|
|
|
|
+ $arr1[$v->pivot->dream_user_id] += $v->pivot->interaction_number;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
foreach ($arr1 as $k => $v){
|
|
foreach ($arr1 as $k => $v){
|