Global translation for all model fields?
I'd like to use a nested array with models and translated field names. And use them globally for columns and fields:
Is there any way to dynamically determine the
$model
from the calling component?3 Replies
I tried something like this, in order to set the model which I can then use in the service provider. But I don't know which method I could use for this:
I've got something working without
::configureUsing
:
It would still be nice to do this in a service provider, if anyone could give me a better solution...i wouldnt do this from a service provider even if it was easily possible, would be a nightmare to reverse
for example, in table filter forms
I could work around that by checking some attribute or checking if a translation in that form is available.
But, I get your point and indeed it's quite... obtrusive.
I'll stick with the
collect()->transform()
. Thanks!