@extends('layouts.master') @section('title') Dashboard @endsection @section('content')
@if(!empty(Auth::user()->profile_image)) Header Avatar @else @endif

Give Social Dashboard

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

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

Total Donors

{{$donor}}

Upcoming Campaigns

{{ $campaign_count['upcoming_count'] }}

Total Campaigns

{{ $campaign_count['count'] }}
@component('common-components.saas-widget') @slot('icon') bx bx-copy-alt @endslot @slot('title') Total Donations @endslot @slot('price') $ {{ $donation['sum'] }} @endslot @slot('arrow') @endslot @slot('bClass') @endslot @slot('bValue') @endslot @slot('comment') @endslot @endcomponent @component('common-components.saas-widget') @slot('icon') bx bx-archive-in @endslot @slot('title') Total Donations this Month @endslot @slot('price') $ {{ $donation['this_month'] }} @endslot @php $this_month = $donation['this_month']; $last_month = $donation['last_month']; if($this_month > $last_month){ $calu = 0.00; if($last_month != 0){ $calu = ($this_month - $last_month)/$last_month*100; } @endphp @slot('arrow') mdi mdi-chevron-up ml-1 text-success @endslot @slot('bClass') badge badge-soft-success font-size-12 @endslot @slot('bValue')+{{ abs(round($calu,2)) }}% @endslot @php }else{ $calu = 0.00; if($last_month != 0){ $calu = ($this_month - $last_month)/$last_month*100; } @endphp @slot('arrow') mdi mdi-chevron-down ml-1 text-danger @endslot @slot('bClass') badge badge-soft-danger font-size-12 @endslot @slot('bValue')-{{ abs(round($calu,2)) }}% @endslot @php } @endphp @slot('comment') From previous Month @endslot @endcomponent @component('common-components.saas-widget') @slot('icon') bx bx-purchase-tag-alt @endslot @slot('title') Average Donation @endslot @slot('price') $ @php echo round($donation['avg'],2); @endphp @endslot @slot('arrow') @endslot @slot('bClass') @endslot @slot('bValue') @endslot @slot('comment') @endslot @endcomponent

Donations

This month

${{ $donation['this_month'] }}

@php $this_month = $donation['this_month']; $last_month = $donation['last_month']; if($this_month > $last_month){ $calu = 0.00; if($last_month != 0){ $calu = ($this_month - $last_month)/$last_month*100; } @endphp + {{ abs(round($calu,2)) }}% @php }else{ $calu = 0.00; if($last_month != 0){ $calu = ($this_month - $last_month)/$last_month*100; } @endphp - {{ abs(round($calu,2)) }}% @php } @endphp

Last month

{{ $donation['last_month'] }}

Stripe Balance

Total Balance

$ {{ $donation['sum'] }}

Available

$ {{ $stripe_data['sum'] }}

Pending

$ {{ $stripe_pending }}

Top Donation campaign

@if(count($donation['monthwisedonation']) > 0) @for ($i = 0; $i < count($donation['monthwisedonation']); $i++) @php $cal = $donation['monthwisedonation'][$i]->monntdonation/$donation['sum'] * 100; $vale= (int)$cal; @endphp @endfor @else @endif
{{ $donation['monthwisedonation'][$i]->campaign_name }}

$ {{ $donation['monthwisedonation'][$i]->monntdonation }}

Donation

$ {{$vale}} %

Donation not add yet

Campaign

@if(count($campaign) > 0) @foreach ($campaign as $value) @php $now = Carbon::now(); $event_date = $value['campaign']->event_datetime; if($event_date == ''){ $event_date = $value['campaign']->created_at; } $today_dt = new DateTime($now); $expire_dt = new DateTime($event_date); if($expire_dt > $today_dt){ break; }else{ @endphp @php } @endphp @endforeach @else @endif
{{$value['campaign']->title != '' ? $value['campaign']->title : ($value['campaign']->facebook_post_title == '' ? "Instagram Post" : $value['campaign']->facebook_post_title) }}

{{ $value['campaign']->description != '' ? $value['campaign']->description : $value['campaign']->caption }}

data not found

@if(count($campaign) > 0) @foreach ($campaign as $value) @php $now = Carbon::now()->timestamp; $event_date = $value['campaign']->event_datetime; if($event_date == ''){ $event_date = $value['campaign']->created_at; } $today_dt = date('Y-m-d',$now); $time = Carbon::parse($event_date)->timestamp; $expire_dt =date('Y-m-d',$time); if($expire_dt == $today_dt){ @endphp @php }else{@endphp @php } break; @endphp @endforeach @else @endif
{{$value['campaign']->title != '' ? $value['campaign']->title : ($value['campaign']->facebook_post_title == '' ? "Instagram Post" : $value['campaign']->facebook_post_title) }}

{{ $value['campaign']->description != '' ? $value['campaign']->description : $value['campaign']->caption }}

there are no events today

data not found

@if(count($campaign) > 0) @foreach ($campaign as $value) @php echo $value['campaign']->id; $now = Carbon::now(); $event_date = $value['campaign']->event_datetime; if($event_date == ''){ $event_date = $value['campaign']->created_at; } $today_dt = new DateTime($now); $expire_dt = new DateTime($event_date); if($expire_dt < $today_dt){ echo "no upcomming event" ; break; }else{ @endphp @php } @endphp @endforeach @else @endif
{{$value['campaign']->title != '' ? $value['campaign']->title : ($value['campaign']->facebook_post_title == '' ? "Instagram Post" : $value['campaign']->facebook_post_title) }}

{{ $value['campaign']->description != '' ? $value['campaign']->description : $value['campaign']->caption }}

data not found

@endsection @section('script') @for ($i = 0; $i < count($donation['monthwisedonation']); $i++) @php $cal=$donation['monthwisedonation'][$i]->monntdonation/$donation['sum'] * 100; $vale= (int)$cal; @endphp @endfor @endsection