protected function validatedSlug($slug)
{
$slug = $slug ?: $this->workingLocale();
/*
* Throw exception if i18n slug is not found in config locales array
*/
if (!in_array($slug, config('linguist.locales'))) {
throw new InvalidLocaleException('Locale slug [' . $slug . '] not configured!');
}
return $slug;
}