예제 #1
0
 public function getFlagTypeCount($id, $type)
 {
     return Flags::where('proposition', [$id])->where('type', $type)->count();
 }
예제 #2
0
 public function getGlobalFlagCount($id)
 {
     return Flags::where('status', '<', 3)->join('propositions', 'flags.proposition', '=', 'propositions.propositionId')->whereNotIn('proposer_id', [$id])->count();
 }