@php /* all locales */ $locales = core()->getAllLocales(); /* request and fallback handling */ $locale = core()->getRequestedLocaleCode(); $channel = core()->getRequestedChannelCode(); $customer_group = core()->getRequestedCustomerGroupCode(); /* handling cases for new locale if not present in current channel */ if ($channel !== 'all') { $channelLocales = app('Webkul\Core\Repositories\ChannelRepository')->findOneByField('code', $channel)->locales; if ($channelLocales && $channelLocales->contains('code', $locale)) { $locales = $channelLocales; } else { $channel = 'all'; } } @endphp