@include('layouts.style') @include('layouts.nav')

Group Name: {{ $group->group_name }}

{{ $group->description }}

@if(Session::has( 'success' ))
{{ Session::get( 'success' ) }}
@elseif( Session::has( 'warning' ))
{{ Session::get( 'warning' ) }}
@endif
@if(!$ingroup)   Join Group @else   Message    Question Dashboard @endif @if($group->created_by==auth()->user()->id)   Admin Dashboard @endif    Invite Users Using Link
@if($group->created_by==auth()->user()->id)
Save all member chats
@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}}

 

Group Members

@if(count($members)>0) @foreach($members as $member) @if($member->user) @endif @endforeach
Name Questions Asked
Today This Month Total
{{ $member->user->name }}   @if($member->user_level=="1") (Admin) @elseif($group->created_by==auth()->user()->id) @endif {{count($member->user->asked_qns_count_today)}} {{count($member->user->asked_qns_count_monthly)}} {{count($member->user->asked_qns_count)}}
@else

No Members

@endif @endif @if($group->created_by==auth()->user()->id)

Join Requests

@if(count($group_requests)>0) @foreach($group_requests as $requests) @if($requests->user)

{{ $requests->user->name }}    Accept  Reject

  @endif @endforeach @else

No new requests

@endif @endif

@include('layouts.footer') @include('layouts.script')