I have some problem with my Laravel 5.6 project. I have created all my routes in api.php
but the localization is not working.
When I create the routes in web.php
the localization is working.
In api.php
setLocale
, getLocale
functions working when I return the response, but it doesn't affect the @lang('messages.smth')
or {{ __('messages.smth) }}
. I think the route can't find the (messages.smth)
but in web.php
all are working correctly. Thanks