@extends('layouts.admin.app')
@section('title',translate('Provider List'))
@push('css_or_js')
@endpush
@section('content')
@php($total_store = \App\Models\Store::whereHas('vendor', function($query){
return $query->where('status', 1);
})->where('module_id', Config::get('module.current_module_id'))->count())
@php($total_store = isset($total_store) ? $total_store : 0)
{{$total_store}}
{{translate('messages.total_providers')}}
@php($active_stores = \App\Models\Store::whereHas('vendor', function($query){
return $query->where('status', 1);
})->where(['status'=>1])->where('module_id', Config::get('module.current_module_id'))->count())
@php($active_stores = isset($active_stores) ? $active_stores : 0)
{{$active_stores}}
{{translate('messages.active_providers')}}
@php($inactive_stores = \App\Models\Store::whereHas('vendor', function($query){
return $query->where('status', 1);
})->where(['status'=>0])->where('module_id', Config::get('module.current_module_id'))->count())
@php($inactive_stores = isset($inactive_stores) ? $inactive_stores : 0)
{{$inactive_stores}}
{{translate('messages.inactive_providers')}}
@php($data = \App\Models\Store::whereHas('vendor', function($query){
return $query->where('status', 1);
})->where('created_at', '>=', now()->subDays(30)->toDateTimeString())->where('module_id', Config::get('module.current_module_id'))->count())
{{$data}}
{{translate('messages.newly_joined_providers')}}
-
{{translate('messages.total_transactions')}} {{$totalTransaction}}
-
{{translate('messages.commission_earned')}} {{\App\CentralLogics\Helpers::format_currency($comissionEarned)}}
-
{{translate('messages.total_provider_withdraws')}} {{\App\CentralLogics\Helpers::format_currency($storeWithdraws)}}
@if(count($stores) !== 0)
@endif
{!! $stores->withQueryString()->links() !!}
@if(count($stores) === 0)
{{translate('no_data_found')}}
@endif