I am making a multilingual site on Laravel 9, I have multilingual routes
ru.home
uk.home
en.home
Based on them, the correct locale is displayed, everything works.
But, instead of writing in each template
{{ route(app()->getLocale().'home') }}
I need to change or override the behavior of a function route() (Illuminate\Routing\UrlGenerator)
To be able to transfer locale into a function like this:
route($name, $parameters = [], $absolute = true, $locale = null)
Как правильно это сделать?