diff --git a/src/Translatable.php b/src/Translatable.php index 36cd12c..7ac019d 100644 --- a/src/Translatable.php +++ b/src/Translatable.php @@ -49,9 +49,9 @@ protected function resolveAttribute($resource, $attribute) if (is_object($resource)) { if ( class_exists('\Spatie\Translatable\TranslatableServiceProvider') && method_exists($resource, 'getTranslations') ) { - $results = $resource->getTranslations($attribute); + return $results = $resource->getTranslations($attribute); } elseif ( class_exists('\Astrotomic\Translatable\TranslatableServiceProvider') && method_exists($resource, 'translations') ) { - $results = $resource->translations->pluck($attribute, config('translatable.locale_key')); + return $results = $resource->translations->pluck($attribute, config('translatable.locale_key')); } }