This repository has been archived on 2020-11-09. You can view files and clone it, but cannot push or open issues or pull requests.
Files
pingan/app/Http/Middleware/Authenticate.php
2020-08-06 16:37:53 +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');
}
}
}