This repository has been archived on 2021-03-23. You can view files and clone it, but cannot push or open issues or pull requests.
Files
pingan_unionpay/app/Http/Middleware/Authenticate.php
2020-08-06 16:42:18 +08:00

22 lines
464 B
PHP

<?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)
{
if (! $request->expectsJson()) {
return route('login');
}
}
}