Skip to content

Commit 700f036

Browse files
committed
Lazy loading
1 parent 1e0eeb4 commit 700f036

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/Resources/PageResource.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,16 @@ public static function getNavigationGroup(): string
6262
return flexiblePagesTrans('pages.nav_group');
6363
}
6464

65+
public static function getEloquentQuery(): \Illuminate\Database\Eloquent\Builder
66+
{
67+
$query = parent::getEloquentQuery()
68+
->with([
69+
'parent',
70+
]);
71+
72+
return $query;
73+
}
74+
6575
public static function form(Form $form): Form
6676
{
6777
return $form
@@ -105,6 +115,7 @@ public static function form(Form $form): Form
105115
public static function table(Table $table): Table
106116
{
107117
return $table
118+
->mo
108119
->columns([
109120
TitleColumn::create(),
110121
TextColumn::make('created_at')

0 commit comments

Comments
 (0)