public function missingKey($namespace, $group, $key)
 {
     if (!in_array($group, $this->config['exclude_groups'])) {
         $locales = Locale::all();
         foreach ($locales as $locale) {
             Translation::firstOrCreate(array('locale_id' => $locale->id, 'group_id' => $group, 'key' => $key));
         }
     }
 }
 public function getIndex($group = null)
 {
     if (isset($group)) {
         $group = Group::find($group);
         $allTranslations = Translation::where('group_id', $group->id)->orderBy('key', 'asc')->get();
     } else {
         $allTranslations = Translation::where('group_id', $group)->orderBy('key', 'asc')->get();
     }
     $locales = Locale::all();
     $groups = Group::groupBy('label');
     $excludedGroups = $this->manager->getConfig('exclude_groups');
     if ($excludedGroups) {
         $groups->whereNotIn('label', $excludedGroups);
     }
     $groups = $groups->lists('id', 'label');
     if ($groups instanceof Collection) {
         $groups = $groups->all();
     }
     return view('translation-manager::index')->with('allTranslations', $allTranslations)->with('locales', $locales)->with('groups', $groups)->with('group', $group)->with('editUrl', action('\\camdjn\\TranslationManager\\Controller@postEdit', [$group]))->with('deleteEnabled', $this->manager->getConfig('delete_enabled'));
 }