Update (views): Fix bug, add world logic

This commit is contained in:
2023-07-26 22:27:10 +08:00
parent 9ebecd7a8f
commit 1c917b865d
6 changed files with 6 additions and 7 deletions

View File

@@ -15,7 +15,7 @@ public function compose(View $view)
if (is_null($current_country_locale))
{
$current_country_locale = CountryLocale::where('slug', config('platform.general.fallback_country_slug'));
$current_country_locale = CountryLocale::where('slug', config('platform.general.fallback_country_slug'))->first();
}
$categories = Category::where('country_locale_id', $current_country_locale->id)->get();

View File

@@ -20,10 +20,9 @@ public function compose(View $view)
}
else
{
$current_country_locale = CountryLocale::where('slug', config('platform.general.fallback_country_slug'));
$current_country_locale = CountryLocale::where('slug', config('platform.general.fallback_country_slug'))->first();
}
$view->with('country_locales', $country_locales)
->with('current_country_locale', $current_country_locale);