stuff
This commit is contained in:
@@ -112,17 +112,20 @@ class SRPAdminController extends Controller
|
|||||||
$months = 3;
|
$months = 3;
|
||||||
$barChartData = array();
|
$barChartData = array();
|
||||||
$start = Carbon::now()->toDateTimeString();
|
$start = Carbon::now()->toDateTimeString();
|
||||||
$end = Carbon::now()->subMonths(3)->toDateTimeString();
|
$end = Carbon::now()->subMonths(1)->toDateTimeString();
|
||||||
|
|
||||||
//We need a function from this library rather than recreating a new library
|
//We need a function from this library rather than recreating a new library
|
||||||
$srpHelper = new SRPHelper();
|
$srpHelper = new SRPHelper();
|
||||||
|
|
||||||
//Get the number of approved, denied, and under review payouts currently from the database
|
//Get the number of approved, denied, and under review payouts currently from the database
|
||||||
$pieOpen = SRPShip::where(['approved' => 'Under Review'])
|
$pieOpen = SRPShip::where(['approved' => 'Under Review'])
|
||||||
|
->whereBetween('created_at', [$start, $end])
|
||||||
->count();
|
->count();
|
||||||
$pieApproved = SRPShip::where(['approved' => 'Approved'])
|
$pieApproved = SRPShip::where(['approved' => 'Approved'])
|
||||||
|
->whereBetween('created_at', [$start, $end])
|
||||||
->count();
|
->count();
|
||||||
$pieDenied = SRPShip::where(['approved' => 'Denied'])
|
$pieDenied = SRPShip::where(['approved' => 'Denied'])
|
||||||
|
->whereBetween('created_at', [$start, $end])
|
||||||
->count();
|
->count();
|
||||||
|
|
||||||
//Get the amount of open orders
|
//Get the amount of open orders
|
||||||
|
|||||||
Reference in New Issue
Block a user