testing
This commit is contained in:
@@ -106,14 +106,17 @@ class DashboardController extends Controller
|
|||||||
if($altOpenCount > 0) {
|
if($altOpenCount > 0) {
|
||||||
//If the number of open requests is greater than zero, add to the open count
|
//If the number of open requests is greater than zero, add to the open count
|
||||||
$openCount += $altOpenCount;
|
$openCount += $altOpenCount;
|
||||||
dd($openCount);
|
|
||||||
//Get the alt's open srp requests
|
//Get the alt's open srp requests
|
||||||
$altOpen = SRPShip::where([
|
$altOpen = SRPShip::where([
|
||||||
'character_id' => $alt->character_id,
|
'character_id' => $alt->character_id,
|
||||||
'approved' => 'Under Review',
|
'approved' => 'Under Review',
|
||||||
])->get()->toArray();
|
])->get()->toArray();
|
||||||
|
|
||||||
//Add the alt's open requests to the open requests array
|
//Add the alt's open requests to the open requests array
|
||||||
array_push($open, $altOpen);
|
foreach($altOpen as $alt) {
|
||||||
|
array_push($open, $alt);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$altApprovedCount = SRPShip::where([
|
$altApprovedCount = SRPShip::where([
|
||||||
@@ -121,13 +124,19 @@ class DashboardController extends Controller
|
|||||||
'approved' => 'Approved',
|
'approved' => 'Approved',
|
||||||
])->count();
|
])->count();
|
||||||
if($altApprovedCount > 0) {
|
if($altApprovedCount > 0) {
|
||||||
|
//If the number of approved requests is greater than zero, add to the approved count
|
||||||
$approvedCount += $altApprovedCount;
|
$approvedCount += $altApprovedCount;
|
||||||
|
|
||||||
|
//Get the alt's approved srp request
|
||||||
$altApproved = SRPShip::where([
|
$altApproved = SRPShip::where([
|
||||||
'character_id' => $alt->character_id,
|
'character_id' => $alt->character_id,
|
||||||
'approved' => 'Approved',
|
'approved' => 'Approved',
|
||||||
])->take(5)->get()->toArray();
|
])->take(5)->get()->toArray();
|
||||||
|
|
||||||
array_push($approved, $altApproved);
|
//For each alt add it to the array
|
||||||
|
foreach($altApproved as $alt) {
|
||||||
|
array_push($approved, $alt);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$altDeniedCount = SRPShip::where([
|
$altDeniedCount = SRPShip::where([
|
||||||
@@ -135,13 +144,19 @@ class DashboardController extends Controller
|
|||||||
'approved' => 'Denied',
|
'approved' => 'Denied',
|
||||||
])->count();
|
])->count();
|
||||||
if($altDeniedCount > 0) {
|
if($altDeniedCount > 0) {
|
||||||
|
//If the denied count is greater then zero for the alt, add it to the count
|
||||||
$deniedCount += $altDeniedCount;
|
$deniedCount += $altDeniedCount;
|
||||||
|
|
||||||
|
//Get the denied alt's srp requests
|
||||||
$altDenied = SRPShip::where([
|
$altDenied = SRPShip::where([
|
||||||
'character_id' => $alt->character_id,
|
'character_id' => $alt->character_id,
|
||||||
'approved' => 'Denied',
|
'approved' => 'Denied',
|
||||||
])->take(5)->get()->toArray();
|
])->take(5)->get()->toArray();
|
||||||
|
|
||||||
array_push($denied, $altDenied);
|
//For each alt's denied request add it to the array
|
||||||
|
foreach($altDenied as $alt) {
|
||||||
|
array_push($denied, $alt);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user