My Profile
@include('layouts.style')
@include('layouts.nav')
My Profile
@if(Session::has( 'success' ))
{{ Session::get( 'success' ) }}
@elseif( Session::has( 'warning' ))
{{ Session::get( 'warning' ) }}
@endif
{{ (Auth()->user()->name) }}
{{ (Auth()->user()->mobile) }}
{{ (Auth()->user()->email) }}
@php
$up = App\Models\UserPackage::where('user_id',auth()->user()->id)->orderBy('end_date','desc')->orderBy('package_id','desc')->first();
$total_limit = App\Models\UserPackage::where('user_id',(auth()->user()->parent>0?auth()->user()->parent:auth()->user()->id))->sum('question_limit');
if(auth()->user()->parent>0){
$used_limit = App\Models\UserQuestion::whereRaw('user_id IN (SELECT id FROM users WHERE parent="'.auth()->user()->parent.'")')->count();
$today_used_limit = App\Models\UserQuestion::whereRaw('user_id IN (SELECT id FROM users WHERE parent="'.auth()->user()->parent.'")')->where('created_at',date("Y-m-d"))->count();
$monthly_used_limit = App\Models\UserQuestion::whereRaw('user_id IN (SELECT id FROM users WHERE parent="'.auth()->user()->parent.'")')->where('created_at','LIKE','%'.date("Y-m-").'%')->count();
} else {
$used_limit = App\Models\UserQuestion::where('user_id',auth()->user()->id)->count();
$today_used_limit = App\Models\UserQuestion::where('user_id',auth()->user()->id)->where('created_at',date("Y-m-d"))->count();
$monthly_used_limit = App\Models\UserQuestion::where('user_id',auth()->user()->id)->where('created_at','LIKE','%'.date("Y-m-").'%')->count();
}
@endphp
@if($up && $up->package)
{{ $up->package->name }}
{{ $up->end_date }}
@else
Forever Free
@endif
{{$total_limit}}
{{$used_limit}} total questions asked
{{$monthly_used_limit}} questions asked this month
{{$today_used_limit}} questions asked today
@php
$referral_count = false;
@endphp
@if(auth()->user()->my_referrer_id=="")
@else
@php
$referral_count = true;
$rc = App\Models\User::where('referral',auth()->user()->my_referrer_id)->count();
@endphp
Copy ID Contact {{$email}} to change your referrer ID
@endif
@if($download)
Download your referral card
@endif