Barryvdh\TranslationManager\Manager::missingKey PHP Method

missingKey() public method

public missingKey ( $namespace, $group, $key )
    public function missingKey($namespace, $group, $key)
    {
        if (!in_array($group, $this->config['exclude_groups'])) {
            Translation::firstOrCreate(array('locale' => $this->app['config']['app.locale'], 'group' => $group, 'key' => $key));
        }
    }

Usage Example

 public function postAdd(Request $request, $group)
 {
     $keys = explode("\n", $request->get('keys'));
     foreach ($keys as $key) {
         $key = trim($key);
         if ($group && $key) {
             $this->manager->missingKey('*', $group, $key);
         }
     }
     return redirect()->back();
 }
All Usage Examples Of Barryvdh\TranslationManager\Manager::missingKey