@extends("admin/layouts.master") @section('title','Admin Dashboard | ') @php $dashsetting = App\DashboardSetting::first(); @endphp @section('title','Admin Dashboard |') @section("body")

Dashboard

{{$user}}

Total Users

More info

{{$order}}

Total Orders

More info

{{$totalcancelorder}}

Total Canceled Orders

More info

{{ count($products) }}

Total Products

More info

{{$store}}

Total Stores

More info

{{$category}}

Total Categories

More info

{{$coupan}}

Total Coupons

More info

{{$faqs}}

Total FAQ's

More info
@if($genrals_settings->vendor_enable == 1)

{{ count($filterpayout) }}

Pending Payouts

See all
@endif
{!! $orderchart->container() !!}
@if($dashsetting->lat_ord ==1)

Latest Orders

@foreach($latestorders as $key=> $order) @endforeach
# Order ID Customer name Total Qty Total Price Order Date
{{$key+1}} #{{ $inv_cus->order_prefix.$order->orderid }} {{ $order->customername }} {{ $order->qty }} {{ $order->ordertotal }} {{ date('d-M-Y',strtotime($order->created_at)) }}
@endif @if($genrals_settings->vendor_enable == 1) @if($dashsetting->rct_str==1)

Recent Store Requests

@foreach($storerequest as $key => $store) @endforeach
# Store Name Buisness Email Request By
{{$key + 1}} {{ $store->name }} {{ $store->email }} {{ $store->owner }}
@endif @endif @if($dashsetting->fb_wid ==1 || $dashsetting->tw_wid==1 || $dashsetting->insta_wid==1)

Social States

@php $connected = @fsockopen("www.facebook.com", 80); @endphp
@if($dashsetting->fb_wid ==1)
Page Likes @if($dashsetting->fb_page_id != '' || $dashsetting->fb_page_token != '') @if($connected) @php $fb_page = "'".$dashsetting->fb_page_id."'"; $access_token = "'".$dashsetting->fb_page_token."'"; $url = 'https://graph.facebook.com/v3.2/'.$fb_page.'?fields=fan_count&access_token='.$access_token; $curl = curl_init($url); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); $result = curl_exec($curl); curl_close($curl); if($result) { // if valid json object $result = json_decode($result); // decode json object if(isset($result->fan_count)) { // get likes from the json object echo ''.$result->fan_count.''; } } else{ echo 'Page is not a valid FB Page'; } @endphp @else

Connection Problem !

@endif @else

Set up your facebook page key in Admin Dashboard Setting !

@endif
@endif @if($dashsetting->tw_wid==1)
Followers @if($dashsetting->tw_username != '') @if($connected) @else

Connection Problem !

@endif @else

Set up Twitter username in Admin Dashboard Setting !

@endif
@endif @if($dashsetting->insta_wid==1)
Followers @if($dashsetting->inst_username !='') @if($connected) @else

Connection Problem !

@endif @else

Set up Instagram username in
Admin Dashboard Setting !

@endif
@endif
@endif
@if($dashsetting->rct_pro ==1)

Recently Added Products

    @foreach($products->sortByDesc('id')->take($dashsetting->max_item_pro) as $pro) @foreach($pro->subvariants as $key=> $sub) @if($sub->def == 1) @php $var_name_count = count($sub['main_attr_id']); $name = array(); $var_name; $newarr = array(); for($i = 0; $i<$var_name_count; $i++){ $var_id =$sub['main_attr_id'][$i]; $var_name[$i] = $sub['main_attr_value'][$var_id]; $name[$i] = App\ProductAttributes::where('id',$var_id)->first(); } try{ $url = url('/details/').'/'.$pro->id.'?'.$name[0]['attr_name'].'='.$var_name[0].'&'.$name[1]['attr_name'].'='.$var_name[1]; }catch(Exception $e) { $url = url('/details/').'/'.$pro->id.'?'.$name[0]['attr_name'].'='.$var_name[0]; } @endphp
  • @if(count($pro->subvariants)>0)
    {{ $sub->variantimages['main_image'] }}
    @endif
  • @endif @endforeach @endforeach
@endif @if($dashsetting->rct_cust ==1)

Recent Users

    @foreach($users = App\User::where('role_id','!=','a')->orderBy('id','DESC')->take($dashsetting->max_item_cust)->get() as $user)
  • @if($user->image !="" || $user->image != null) @else @endif {{ $user->name }} {{ date('Y-m-d',strtotime($user->created_at)) }}
  • @endforeach
@endif
{!! $piechart->container() !!}
{!! $userchart->container() !!}
@endsection @section('custom-script') {!! $userchart->script() !!} {!! $piechart->script() !!} {!! $orderchart->script() !!} @endsection