@endif
@if($ingroup)
@php
$used_limit = App\Models\UserQuestion::whereRaw('user_id IN (SELECT user_id FROM chat_members WHERE group_id="'.$group->id.'")')->count();
$today_used_limit = App\Models\UserQuestion::whereRaw('user_id IN (SELECT user_id FROM chat_members WHERE group_id="'.$group->id.'")')->where('created_at',date("Y-m-d"))->count();
$monthly_used_limit = App\Models\UserQuestion::whereRaw('user_id IN (SELECT user_id FROM chat_members WHERE group_id="'.$group->id.'")')->where('created_at','LIKE','%'.date("Y-m-").'%')->count();
@endphp
Question Asked Stats
Total questions asked: {{$used_limit}}
Total questions asked today: {{$today_used_limit}}
Total questions asked this month: {{$monthly_used_limit}}