0

I'm using Vagrant + Homestead + VirtualBox and Laravel 5.4, middleware redirecting not authenticated users to login page, which is on different url:

return redirect()->away(env('APP_LOGIN') . '&logout=true');

My .env file:

APP_LOGIN=http://login.app/

But when redirect happens, it's redirect to

http://login.app/://login.app/

How to fix it?

Svitavsky
  • 291
  • 1
  • 15

1 Answers1

0

The redirect after logout is hard coded in the trait AuthenticatesAndRegistersUsers. You can override it in your AuthController by adding this:

public function getLogout()
 {
     $this->auth->logout();

     return redirect('logout');
 }

Original answer is given here https://stackoverflow.com/a/29797510/7672311

Dawson
  • 23
  • 6