Files

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
469 B
PHP
Raw Permalink Normal View History

2020-05-23 19:05:18 +02:00
<?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
2021-03-28 19:18:47 +02:00
* @return string|void
2020-05-23 19:05:18 +02:00
*/
protected function redirectTo($request)
{
if (! $request->expectsJson()) {
return route('login');
}
}
}