Closed abdooobsl closed 2 years ago
Hey, you should use an Eloquent API Resource instead of directly returning the model collection.
https://github.com/Astrotomic/laravel-translatable/issues?q=resource https://laravel.com/docs/8.x/eloquent-resources
hi how to get the translated value only when i get all records like this
$packages = Package::all();
it returns like thisname an description are loaded correct by lang but i want to hide translations i tried to set
'to_array_always_loads_translations' => true
to false but name an description are not loaded at all