.idea
app
Console
Exceptions
Http
Controllers
Middleware
Authenticate.php
EncryptCookies.php
PreventRequestsDuringMaintenance.php
RedirectIfAuthenticated.php
TrimStrings.php
TrustHosts.php
TrustProxies.php
VerifyCsrfToken.php
Kernel.php
Models
Providers
bootstrap
config
database
deploy
public
resources
routes
storage
tests
.drone.yml
.editorconfig
.env.example
.gitattributes
.gitignore
.styleci.yml
Dockerfile
README.md
artisan
composer.json
composer.lock
package-lock.json
package.json
phpunit.xml
post_deploy.sh
server.php
webpack.mix.js
22 lines
469 B
PHP
22 lines
469 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|null
|
|
*/
|
|
protected function redirectTo($request)
|
|
{
|
|
if (! $request->expectsJson()) {
|
|
return route('login');
|
|
}
|
|
}
|
|
}
|