tests
This commit is contained in:
@@ -45,9 +45,9 @@ class TestController extends Controller
|
||||
//Get a list of the alts for each character, then process the ledgers and combine them to send one mail out
|
||||
//in this first part
|
||||
foreach($users as $char) {
|
||||
$altCount = $char->altCount();
|
||||
$altCount = $char->altCount;
|
||||
if($altCount > 0) {
|
||||
$alts = $char->userAlts();
|
||||
$alts = $char->userAlts;
|
||||
|
||||
foreach($alts as $alt) {
|
||||
$perms->push([
|
||||
|
||||
@@ -63,6 +63,10 @@ class User extends Authenticatable
|
||||
return $this->hasMany('App\Models\User\UserAlt', 'character_id', 'main_id');
|
||||
}
|
||||
|
||||
public function getUserAlts() {
|
||||
return $this->hasMany('App\Models\User\UserAlt', 'character_id', 'main_id')->get();
|
||||
}
|
||||
|
||||
public function altCount() {
|
||||
return $this->hasMany('App\Models\User\UserAlt', 'character_id', 'main_id')->count();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user