customizable redirect on auth failure

This commit is contained in:
Taylor Otwell
2018-03-13 16:09:47 -05:00
parent c30adc88c1
commit a14e62325c
2 changed files with 20 additions and 1 deletions

View File

@@ -0,0 +1,19 @@
<?php
namespace App\Http\Middleware;
use Illuminate\Auth\Middleware\Authenticate as Middleware;
class Authenticate extends Middleware
{
/**
* Get the path the user should be redirected to when they are not authenticated.
*
* @param \Illuminate\Http\Request $request
* @return string
*/
protected function redirectTo($request)
{
return route('login');
}
}