public function getFieldByLocale($locale = 'en')
    {
        $fields = $this->fields()->where('locale', $locale)->get();
        if ($fields->count()) {
            $object = $fields[0];
        } else {
            $object = new FieldTranslation();
        }

        return $object;
    }
public function getFieldByLocale($locale = 'en')
    {
        $fields = $this->fields()->where('locale', $locale)->get();
        if ($fields->count()) {
            $object = $fields[0];
        } else {
            $object = new FieldTranslation();
        }

        return $object;
    }
public function getFieldByLocale ( $ locale = 'en' ) { $ fields = $ this -> fields ( ) -> where ( 'locale' , $ locale ) -> get ( ) ; if ( $ fields -> count ( ) ) { $ object = $ fields [ 0 ] ; } else { $ object = new FieldTranslation ( ) ; } return $ object ; }
Get list fields by locale.

@param string $locale

@return FieldTranslation
Get list fields by locale .