src/Manager.php
public function collectFromFiles()
    {
        $translationKeys = [];

        foreach ($this->getAllViewFilesWithTranslations() as $file => $matches) {
            foreach ($matches as $key) {
                try {
                    list($fileName, $keyName) = explode('.', $key, 2);
                } catch (\ErrorException $e) {
                    continue;
                }

                if (isset($translationKeys[$fileName]) && in_array($keyName, $translationKeys[$fileName])) {
                    continue;
                }

                $translationKeys[$fileName][] = $keyName;
            }
        }

        return $translationKeys;
    }
public function collectFromFiles()
    {
        $translationKeys = [];

        foreach ($this->getAllViewFilesWithTranslations() as $file => $matches) {
            foreach ($matches as $key) {
                try {
                    list($fileName, $keyName) = explode('.', $key, 2);
                } catch (\ErrorException $e) {
                    continue;
                }

                if (isset($translationKeys[$fileName]) && in_array($keyName, $translationKeys[$fileName])) {
                    continue;
                }

                $translationKeys[$fileName][] = $keyName;
            }
        }

        return $translationKeys;
    }
public function collectFromFiles ( ) { $ translationKeys = [ ] ; foreach ( $ this -> getAllViewFilesWithTranslations ( ) as $ file => $ matches ) { foreach ( $ matches as $ key ) { try { list ( $ fileName , $ keyName ) = explode ( '.' , $ key , 2 ) ; } catch ( \ ErrorException $ e ) { continue ; } if ( isset ( $ translationKeys [ $ fileName ] ) && in_array ( $ keyName , $ translationKeys [ $ fileName ] ) ) { continue ; } $ translationKeys [ $ fileName ] [ ] = $ keyName ; } } return $ translationKeys ; }
Collect all translation keys from views files.

e.g. ['users' => ['city', 'name', 'phone']]

@return array
Collect all translation keys from views files .