Skip to content

Commit

Permalink
Merge pull request #2 from Cantilever/fix/nova-field-issues
Browse files Browse the repository at this point in the history
Fixed nova field issues
  • Loading branch information
ashokmladumor authored Nov 18, 2024
2 parents 8443b0f + cad7d1b commit f13f316
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Translatable.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
}
}

Expand Down

0 comments on commit f13f316

Please sign in to comment.