@extends('layouts.frontapp') @section('title', 'Profile') @section('content') @php function get_city_name($id){ if($id) { $result=DB::table('cities')->where('id',$id)->first(); return $result->name; } } function get_state_name($id){ if($id) { $result=DB::table('states')->where('id',$id)->first(); return $result->name; } } @endphp
@if(isset( $usersData->profile_picture)) @php $profileimg = url('/')."/uploads/members/".$usersData->profile_picture; if($usersData->sm!='') { $profileimg = $usersData->profile_picture; } @endphp Avatar @else Avatar @endif

{{$usersData->name}}

Member Since {{date("jS M Y",strtotime($usersData->created_at))}}
{{$usersData->points}} Points
{{$usersData->coins}} Coins
@if($usersData->id != Auth::user()->id) @php $isFollowed = DB::table('followers_following')->where('user_id', Auth::user()->id)->where('following_id', $usersData->id)->count(); @endphp
@if($isFollowed>0) Unfollow @else Follow @endif
@endif @if($usersData->id == Auth::user()->id)
Edit Profile
@endif

About Me

{{isset($usersData->remarks)?$usersData->remarks:'-'}}

Statistics

{{count($following_list)}} Following

{{count($followers_list)}} Followers

@php $userLikeCount = 0; if(Auth::check()) { $userLikeCount = DB::table('fan_post AS p'); $userLikeCount = $userLikeCount->leftJoin('voting AS v', 'p.id', '=', 'v.postid'); $userLikeCount = $userLikeCount->where('v.vtype', 'post'); $userLikeCount = $userLikeCount->where('p.created_by', $usersData->id)->count(); } @endphp {{$userLikeCount}} Likes

@php $userPostCount = 0; if(Auth::check()) { $userPostCount = DB::table('fan_post')->where('created_by', $usersData->id)->count(); } @endphp {{$userPostCount}} Posts

@if($usersData->id == Auth::user()->id) Activities @endif id != Auth::user()->id) aria-selected="true" @else aria-selected="false" @endif>Followers {{count($followers_list)}} Following {{count($following_list)}} @if($usersData->id == Auth::user()->id) Coins Notification @if($notification_count>0) {{$notification_count}} @endif @endif
@if($usersData->id == Auth::user()->id)
@if($usersData->id == Auth::user()->id) Activities @endif Notification @if($notification_count>0) {{$notification_count}}@endif Coins
@endif
id != Auth::user()->id) aria-selected="true" @else aria-selected="false" @endif>Followers {{count($followers_list)}} Following {{count($following_list)}} @if($usersData->id == Auth::user()->id) @endif
@php $log_activity = DB::select("select * from `log_activity` where `userid` = '".Auth::user()->id."' and (`action` = 'post' or `action` = 'money' or `action` = 'redeem') order by `id` desc"); @endphp @if(count($log_activity)>0) @foreach($log_activity as $logkey => $log)
@if(isset( $usersData->profile_picture)) @php $profileimg = url('/')."/uploads/members/".$usersData->profile_picture; if($usersData->sm!='') { $profileimg = $usersData->profile_picture; } @endphp Avatar @else Avatar @endif

@if($log->modulename!='post' && $log->action!='money' && $log->modulename!='share') @if($log->action=='redeem') @endif {{$log->modulename}} @endif @if($log->action=='redeem') @php $logarray = explode('***',$log->description); @endphp - {{$logarray[0]}} @if(count($logarray)>1) {{isset($logarray[1])?$logarray[1]:$history_item->newdata}} @else {{$logarray->newdata}} @endif @else {{$log->description}} @endif - {{ \Carbon\Carbon::parse($log->logtime)->diffForHumans() }}

{{ \Carbon\Carbon::parse($log->logtime)->diffForHumans() }} {{ date("h:i A - d.m.Y",strtotime($log->logtime))}}
@endforeach @else
  • No recent activity found!
  • @endif
    @include('frontend.followers')
    @include('frontend.following')
    Total Coins Earned

    {{Auth::user()->points}}

    Total Coins Redeemed

    {{Auth::user()->coins}}

    Available
    Coins

    {{Auth::user()->available_points}}

    @if(Auth::user()->available_points>=100) @else @endif

    1 Coin = 1 Rupee
    @if(Auth::user()->available_points>=100)
    @endif @if(Auth::user()->available_points>=200)
    @endif @if(Auth::user()->available_points>=500)
    @endif @if(Auth::user()->available_points>=1000)
    @endif @if(Auth::user()->available_points>=2000)
    @endif
    @if(Auth::user()->available_points>=100) @else Not enough coins to redeem! @endif

    Transaction History

      @php $transaction_history = DB::select("select * from `log_activity` where `userid` = '".Auth::user()->id."' and (`action` = 'point' or `action` = 'rank' or `action` = 'redeem') order by `logtime` desc"); @endphp @if(count($transaction_history)>0) @foreach($transaction_history as $history_key=>$history_item) @php $detailsarray = explode('***',$history_item->description); @endphp @if($history_item->newdata>0)
    • {{$detailsarray[0]}}

      @if(count($detailsarray)>1)

      @if($history_item->action=='redeem') - @else + @endif {{isset($detailsarray[1])?$detailsarray[1]:$history_item->newdata}}

      @else

      @if($history_item->action=='redeem') - @else + @endif {{$history_item->newdata}}

      @endif
      @if($history_item->action=='redeem') @endif @if($history_item->modulename=='leaderboard') @else {{ $history_item->modulename }} @endif
      {{ date("d M Y h:i A",strtotime($history_item->logtime))}}
    • @endif @endforeach @endif
    All
    Mark as Read
    Delete
    • @if($notification_count>0) 1 @else 0 @endif- {{count($notification)}} of {{$notification_count}}
    • =10) onclick="fetch_data('next','{{$usersData->id}}')" @endif>
    @include('frontend.mail')
    @endsection