mirror of
https://github.com/AnimeThemes/animethemes-server.git
synced 2026-10-14 23:02:05 +02:00
* feat(admin): migrate db dumps from github to platform * style: fix StyleCI findings
32 lines
639 B
PHP
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;
|
|
}
|
|
}
|