src/Controller.php
/**
     * postListGroup - list all key-translations from particular group
     */
list all key-translations from particular group
list all key - translations from particular group
public function postListGroup(Request $request)
    {
        $group=$request->group;
        $allStrings = Translation::where('group', '=', $group)
            ->orderBy('id', 'desc')->get();
        $numChanged=0;
        $translationsBundle = [];
        foreach($allStrings as $translation) {
            $translationsBundle[$translation->key][$translation->locale] = $translation;
            if($translation->status==Translation::STATUS_CHANGED) {
                $numChanged++;
            }
        }
        $locales = $this->manager->getLocales();
        $numTranslations = count($translationsBundle);
        return view('translation-manager::translation_table')
            ->with('translationsBundle', $translationsBundle)
            ->with('locales', $locales)
            ->with('numTranslations', $numTranslations)
            ->with('numChanged', $numChanged);
    }
public function postListGroup ( Request $ request ) { $ group = $ request -> group ; $ allStrings = Translation :: where ( 'group' , '=' , $ group ) -> orderBy ( 'id' , 'desc' ) -> get ( ) ; $ numChanged = 0 ; $ translationsBundle = [ ] ; foreach ( $ allStrings as $ translation ) { $ translationsBundle [ $ translation -> key ] [ $ translation -> locale ] = $ translation ; if ( $ translation -> status == Translation :: STATUS_CHANGED ) { $ numChanged ++ ; } } $ locales = $ this -> manager -> getLocales ( ) ; $ numTranslations = count ( $ translationsBundle ) ; return view ( 'translation-manager::translation_table' ) -> with ( 'translationsBundle' , $ translationsBundle ) -> with ( 'locales' , $ locales ) -> with ( 'numTranslations' , $ numTranslations ) -> with ( 'numChanged' , $ numChanged ) ; }
postListGroup - list all key-translations from particular group
postListGroup - list all key - translations from particular group