Skip to content

Commit

Permalink
Eager load aliases (#702)
Browse files Browse the repository at this point in the history
  • Loading branch information
andyksaw authored Sep 22, 2022
1 parent 31dce61 commit 6b4c7c9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/Http/Controllers/Panel/GameIPBanController.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class GameIPBanController extends WebController
{
public function index(Request $request): View
{
$bans = GameIPBan::with('bannerPlayer')
$bans = GameIPBan::with('bannerPlayer.aliases')
->orderBy('created_at', 'desc')
->paginate(100);

Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/Panel/GamePlayerBanController.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class GamePlayerBanController extends WebController
{
public function index(Request $request): View
{
$bans = GamePlayerBan::with('bannedPlayer', 'bannerPlayer', 'unbannerPlayer')
$bans = GamePlayerBan::with('bannedPlayer.aliases', 'bannerPlayer.aliases', 'unbannerPlayer.aliases')
->orderBy('created_at', 'desc')
->paginate(100);

Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/Panel/PlayerWarningController.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class PlayerWarningController extends WebController
{
public function index(Request $request): View
{
$warnings = PlayerWarning::with('warnedPlayer', 'warnerPlayer')
$warnings = PlayerWarning::with('warnedPlayer.aliases', 'warnerPlayer.aliases')
->orderBy('created_at', 'desc')
->paginate(100);

Expand Down

0 comments on commit 6b4c7c9

Please sign in to comment.