Update (views): Fix bug, add world logic
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user