Files
paranarimasu 1d93000c6f feat(admin): migrate db dumps from github to platform (#463)
* feat(admin): migrate db dumps from github to platform

* style: fix StyleCI findings
2022-09-18 22:31:29 -05:00

32 lines
639 B
PHP

<?php
declare(strict_types=1);
namespace App\Http\Middleware\Auth;
use Illuminate\Auth\Middleware\Authenticate as Middleware;
use Illuminate\Http\Request;
/**
* Class Authenticate.
*/
class Authenticate extends Middleware
{
/**
* Get the path the user should be redirected to when they are not authenticated.
*
* @param Request $request
* @return string|null
*
* @noinspection PhpMissingParentCallCommonInspection
*/
protected function redirectTo($request): ?string
{
if (! $request->expectsJson()) {
return route('login');
}
return null;
}
}