src/Language.php
public static function allowed($locale = null)
    {
        if ($locale) {
            return in_array($locale, array_keys(self::allowed()));
        }

        if (config('language.allowed')) {
            return self::names(array_merge(config('language.allowed'), [config('app.locale')]));
        } else {
            return self::names([config('app.locale')]);
        }
    }
public static function allowed($locale = null)
    {
        if ($locale) {
            return in_array($locale, array_keys(self::allowed()));
        }

        if (config('language.allowed')) {
            return self::names(array_merge(config('language.allowed'), [config('app.locale')]));
        } else {
            return self::names([config('app.locale')]);
        }
    }
Return true if $code is an allowed lang.
Get all allowed languages.

@param string $locale

@return bool|array