Skip to content

Commit 583d219

Browse files
committed
language passed to index page
1 parent ee842b2 commit 583d219

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Models/Content.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,13 @@ public function parent()
4747
*/
4848
public static function indexPage()
4949
{
50-
return self::where('website_id', env('WEBSITE_ID'))->whereNull('parent_id')->orderBy('position', 'ASC')->first();
50+
$languageCode = getCurrentLanguageCode();
51+
52+
return self::where('website_id', env('WEBSITE_ID'))
53+
->where('language_code', $languageCode)
54+
->whereNull('parent_id')
55+
->orderBy('position', 'ASC')
56+
->first();
5157
}
5258

5359
/**

0 commit comments

Comments
 (0)