Reputation: 47
I have AuthController
here, where you can see it has some variables in it. I'm using them as paths after operation.
class AuthController extends Controller {
use AuthenticatesAndRegistersUsers;
private $loginPath = "authenticate";
protected $redirectPath = "/";
}
The problem is I'm using Laravel localization, after login, registration operations, it returns to sites default locale. For example if I was in www.mysite.com/de/authenticate
, after login operation I'm in www.mysite.com/en
.
I tried to put a method in it, like $loginPath = App::getLocale()."/authenticate";
but it won't work.
Upvotes: 1
Views: 640
Reputation: 54379
With the standard configuration this should work:
$locale = config('app.locale');
Upvotes: 3