pagination testing
This commit is contained in:
@@ -128,25 +128,9 @@ class User extends Authenticatable
|
|||||||
'character_id' => $this->character_id,
|
'character_id' => $this->character_id,
|
||||||
])->get('permission')->toArray();
|
])->get('permission')->toArray();
|
||||||
|
|
||||||
return $perms;
|
return $perms[0];
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getPermissions() {
|
|
||||||
$permCount = UserPermission::where([
|
|
||||||
'character_id' => $this->character_id,
|
|
||||||
])->count();
|
|
||||||
|
|
||||||
if($permCount > 0) {
|
|
||||||
$perms = UserPermission::where([
|
|
||||||
'character_id' => $this->character_id,
|
|
||||||
])->get('permission');
|
|
||||||
|
|
||||||
return $perms;
|
|
||||||
} else {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user