src/Repositories/TranslationRepository.php
public function updateDefaultByCode($code, $text)
    {
        list($namespace, $group, $item) = $this->parseCode($code);
        $locale                         = $this->defaultLocale;
        $translation                    = $this->model->whereLocale($locale)->whereNamespace($namespace)->whereGroup($group)->whereItem($item)->first();
        if (!$translation) {
            return $this->create(compact('locale', 'namespace', 'group', 'item', 'text'));
        }
        return $this->update($translation->id, $text);
    }
public function updateDefaultByCode($code, $text)
    {
        list($namespace, $group, $item) = $this->parseCode($code);
        $locale                         = $this->defaultLocale;
        $translation                    = $this->model->whereLocale($locale)->whereNamespace($namespace)->whereGroup($group)->whereItem($item)->first();
        if (!$translation) {
            return $this->create(compact('locale', 'namespace', 'group', 'item', 'text'));
        }
        return $this->update($translation->id, $text);
    }
public function updateDefaultByCode ( $ code , $ text ) { list ( $ namespace , $ group , $ item ) = $ this -> parseCode ( $ code ) ; $ locale = $ this -> defaultLocale ; $ translation = $ this -> model -> whereLocale ( $ locale ) -> whereNamespace ( $ namespace ) -> whereGroup ( $ group ) -> whereItem ( $ item ) -> first ( ) ; if ( ! $ translation ) { return $ this -> create ( compact ( 'locale' , 'namespace' , 'group' , 'item' , 'text' ) ) ; } return $ this -> update ( $ translation -> id , $ text ) ; }
Insert or Update entry by translation code for the default locale.

@param  string  $code
@param  string  $text
@return boolean
Insert or Update entry by translation code for the default locale .