src/Repositories/LanguageRepository.php
public function availableLocales()
    {
        if ($this->config->has('translator.locales')) {
            return $this->config->get('translator.locales');
        }

        if ($this->config->get('translator.source') !== 'files') {
            if ($this->tableExists()) {
                $locales = $this->model->distinct()->get()->pluck('locale')->toArray();
                $this->config->set('translator.locales', $locales);
                return $locales;
            }
        }

        return $this->defaultAvailableLocales;
    }
public function availableLocales()
    {
        if ($this->config->has('translator.locales')) {
            return $this->config->get('translator.locales');
        }

        if ($this->config->get('translator.source') !== 'files') {
            if ($this->tableExists()) {
                $locales = $this->model->distinct()->get()->pluck('locale')->toArray();
                $this->config->set('translator.locales', $locales);
                return $locales;
            }
        }

        return $this->defaultAvailableLocales;
    }
public function availableLocales ( ) { if ( $ this -> config -> has ( 'translator.locales' ) ) { return $ this -> config -> get ( 'translator.locales' ) ; } if ( $ this -> config -> get ( 'translator.source' ) !== 'files' ) { if ( $ this -> tableExists ( ) ) { $ locales = $ this -> model -> distinct ( ) -> get ( ) -> pluck ( 'locale' ) -> toArray ( ) ; $ this -> config -> set ( 'translator.locales' , $ locales ) ; return $ locales ; } } return $ this -> defaultAvailableLocales ; }
Returns a list of all available locales.

@return array
Returns a list of all available locales .